Bump version number for 1.9.9.
[bpt/guile.git] / libguile / Makefile.am
CommitLineData
733943b9 1## Process this file with Automake to create Makefile.in
2764bd99 2##
e2c2a699 3## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
2764bd99
JB
4##
5## This file is part of GUILE.
54f16aec 6##
53befeb7
NJ
7## GUILE is free software; you can redistribute it and/or modify it
8## under the terms of the GNU Lesser General Public License as
9## published by the Free Software Foundation; either version 3, or
2764bd99 10## (at your option) any later version.
54f16aec 11##
2764bd99
JB
12## GUILE is distributed in the hope that it will be useful, but
13## WITHOUT ANY WARRANTY; without even the implied warranty of
14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53befeb7 15## GNU Lesser General Public License for more details.
54f16aec 16##
53befeb7
NJ
17## You should have received a copy of the GNU Lesser General Public
18## License along with GUILE; see the file COPYING.LESSER. If not,
19## write to the Free Software Foundation, Inc., 51 Franklin Street,
20## Fifth Floor, Boston, MA 02110-1301 USA
733943b9 21
3307df95 22AUTOMAKE_OPTIONS = gnu
733943b9 23
a0599745 24## Prevent automake from adding extra -I options
8f99e3f3 25DEFS = @DEFS@
535b3592
LC
26
27# Override Automake's `DEFAULT_INCLUDES'. By default, it contains
28# "-I$(srcdir)", which causes problems on Tru64 where our "random.h"
29# is picked up by <stdlib.h> instead of the libc's <random.h>.
30DEFAULT_INCLUDES =
31
733943b9
TT
32## Check for headers in $(srcdir)/.., so that #include
33## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
6caac03c 34## building. Also look for Gnulib headers in `lib'.
442f3f20 35AM_CPPFLAGS = -DBUILDING_LIBGUILE=1 -I$(top_srcdir) -I$(top_builddir) \
d8b04f04 36 -I$(top_srcdir)/lib -I$(top_builddir)/lib $(LIBFFI_CFLAGS)
6caac03c 37
d8b04f04 38AM_CFLAGS = $(GCC_CFLAGS) $(CFLAG_VISIBILITY)
6caac03c
LC
39
40## The Gnulib Libtool archive.
41gnulib_library = $(top_builddir)/lib/libgnu.la
733943b9 42
4079f87e 43ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
abc049a9 44 --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
fef07353 45
44602b08 46lib_LTLIBRARIES = libguile-@GUILE_EFFECTIVE_VERSION@.la
f94b6524 47bin_PROGRAMS = guile
b32fca0f 48
64c2db80
RB
49noinst_PROGRAMS = guile_filter_doc_snarfage gen-scmconfig
50
51gen_scmconfig_SOURCES = gen-scmconfig.c
52
53## Override default rule; this should be compiled for BUILD host.
54## For some reason, OBJEXT does not include the dot
55gen-scmconfig.$(OBJEXT): gen-scmconfig.c
56 if [ "$(cross_compiling)" = "yes" ]; then \
47871d5a 57 $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) -c -o $@ $<; \
64c2db80
RB
58 else \
59 $(COMPILE) -c -o $@ $<; \
60 fi
61
2e945bcc
SJ
62## Override default rule; this should run on BUILD host.
63gen-scmconfig$(EXEEXT): $(gen_scmconfig_OBJECTS) $(gen_scmconfig_DEPENDENCIES)
64 @rm -f gen-scmconfig$(EXEEXT)
65 if [ "$(cross_compiling)" = "yes" ]; then \
66 $(CCLD_FOR_BUILD) -o $@ $(gen_scmconfig_OBJECTS); \
67 else \
68 $(LINK) $(gen_scmconfig_OBJECTS) $(LDADD) $(LIBS); \
69 fi
70
71scmconfig.h: ${top_builddir}/config.h gen-scmconfig$(EXEEXT)
64c2db80 72 rm -f scmconfig.h.tmp
eaf94f77 73 cat $(srcdir)/scmconfig.h.top > scmconfig.h.tmp
2e945bcc 74 ./gen-scmconfig$(EXEEXT) >> scmconfig.h.tmp
64c2db80
RB
75 chmod 444 scmconfig.h.tmp
76 rm -f scmconfig.h
77 mv scmconfig.h.tmp scmconfig.h
78
b32fca0f
MV
79guile_filter_doc_snarfage_SOURCES = c-tokenize.c
80
81## Override default rule; this should be compiled for BUILD host.
82## For some reason, OBJEXT does not include the dot
83c-tokenize.$(OBJEXT): c-tokenize.c
84 if [ "$(cross_compiling)" = "yes" ]; then \
47871d5a 85 $(CC_FOR_BUILD) $(DEFS) $(AM_CPPFLAGS) -c -o $@ $<; \
b32fca0f 86 else \
4ea57d5b 87 $(COMPILE) -c -o $@ $<; \
b32fca0f
MV
88 fi
89
90## Override default rule; this should run on BUILD host.
91guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS) $(guile_filter_doc_snarfage_DEPENDENCIES)
92 @rm -f guile_filter_doc_snarfage$(EXEEXT)
93 if [ "$(cross_compiling)" = "yes" ]; then \
94 $(CCLD_FOR_BUILD) -o $@ $(guile_filter_doc_snarfage_OBJECTS); \
95 else \
96 $(LINK) $(guile_filter_doc_snarfage_OBJECTS) $(LDADD) $(LIBS); \
97 fi
98
549436de
JB
99
100guile_SOURCES = guile.c
bfb2e113 101guile_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
44602b08 102guile_LDADD = libguile-@GUILE_EFFECTIVE_VERSION@.la
de7d32d0 103guile_LDFLAGS = $(GUILE_CFLAGS)
5bbc5359 104
44602b08 105libguile_@GUILE_EFFECTIVE_VERSION@_la_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
ee2a8b9b 106
44602b08 107libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = \
a4a0d399
AW
108 alist.c \
109 arbiters.c \
c53c0893 110 array-handle.c \
5d1b3b2d 111 array-map.c \
2fa901a5 112 arrays.c \
a4a0d399
AW
113 async.c \
114 backtrace.c \
115 boolean.c \
cf396142 116 bitvectors.c \
a4a0d399
AW
117 bytevectors.c \
118 chars.c \
b9c100d0 119 control.c \
a4a0d399
AW
120 continuations.c \
121 debug.c \
122 deprecated.c \
123 deprecation.c \
124 discouraged.c \
125 dynwind.c \
126 eq.c \
127 error.c \
128 eval.c \
129 evalext.c \
130 extensions.c \
131 feature.c \
132 fluids.c \
e2c2a699 133 foreign.c \
a4a0d399
AW
134 fports.c \
135 frames.c \
a4a0d399 136 gc-malloc.c \
a4a0d399 137 gc.c \
a4a0d399
AW
138 gdbint.c \
139 gettext.c \
1030b450 140 generalized-arrays.c \
f332e957 141 generalized-vectors.c \
a4a0d399
AW
142 goops.c \
143 gsubr.c \
144 guardians.c \
145 hash.c \
146 hashtab.c \
147 hooks.c \
756e8a3a 148 i18n.c \
a4a0d399
AW
149 init.c \
150 inline.c \
151 instructions.c \
152 ioext.c \
153 keywords.c \
154 lang.c \
155 list.c \
156 load.c \
157 macros.c \
158 mallocs.c \
b7742c6b 159 memoize.c \
a4a0d399
AW
160 modules.c \
161 null-threads.c \
162 numbers.c \
163 objcodes.c \
a4a0d399
AW
164 objprop.c \
165 options.c \
166 pairs.c \
167 ports.c \
168 print.c \
169 procprop.c \
170 procs.c \
171 programs.c \
7b893819 172 promises.c \
a4a0d399
AW
173 properties.c \
174 r6rs-ports.c \
a4a0d399
AW
175 random.c \
176 rdelim.c \
177 read.c \
178 root.c \
179 rw.c \
180 scmsigs.c \
181 script.c \
182 simpos.c \
183 smob.c \
184 sort.c \
185 srcprop.c \
186 srfi-13.c \
187 srfi-14.c \
188 srfi-4.c \
189 stackchk.c \
190 stacks.c \
191 stime.c \
192 strings.c \
193 strorder.c \
194 strports.c \
195 struct.c \
196 symbols.c \
197 threads.c \
198 throw.c \
0f458a37 199 trees.c \
476b894c 200 uniform.c \
a4a0d399
AW
201 values.c \
202 variable.c \
203 vectors.c \
204 version.c \
205 vm.c \
206 vports.c \
207 weaks.c
83495480 208
a4a0d399
AW
209DOT_X_FILES = \
210 alist.x \
211 arbiters.x \
c53c0893 212 array-handle.x \
5d1b3b2d 213 array-map.x \
2fa901a5 214 arrays.x \
a4a0d399
AW
215 async.x \
216 backtrace.x \
217 boolean.x \
cf396142 218 bitvectors.x \
a4a0d399
AW
219 bytevectors.x \
220 chars.x \
b9c100d0 221 control.x \
a4a0d399
AW
222 continuations.x \
223 debug.x \
224 deprecated.x \
225 deprecation.x \
226 discouraged.x \
227 dynl.x \
228 dynwind.x \
229 eq.x \
230 error.x \
231 eval.x \
232 evalext.x \
233 extensions.x \
234 feature.x \
235 fluids.x \
e2c2a699 236 foreign.x \
a4a0d399 237 fports.x \
a4a0d399 238 gc-malloc.x \
a4a0d399
AW
239 gc.x \
240 gettext.x \
1030b450 241 generalized-arrays.x \
f332e957 242 generalized-vectors.x \
a4a0d399
AW
243 goops.x \
244 gsubr.x \
245 guardians.x \
246 hash.x \
247 hashtab.x \
248 hooks.x \
249 i18n.x \
250 init.x \
251 ioext.x \
252 keywords.x \
253 lang.x \
254 list.x \
255 load.x \
256 macros.x \
257 mallocs.x \
b7742c6b 258 memoize.x \
a4a0d399
AW
259 modules.x \
260 numbers.x \
a4a0d399
AW
261 objprop.x \
262 options.x \
263 pairs.x \
264 ports.x \
265 print.x \
266 procprop.x \
267 procs.x \
7b893819 268 promises.x \
a4a0d399
AW
269 properties.x \
270 r6rs-ports.x \
a4a0d399
AW
271 random.x \
272 rdelim.x \
273 read.x \
274 root.x \
275 rw.x \
276 scmsigs.x \
277 script.x \
278 simpos.x \
279 smob.x \
280 sort.x \
281 srcprop.x \
282 srfi-13.x \
283 srfi-14.x \
284 srfi-4.x \
285 stackchk.x \
286 stacks.x \
287 stime.x \
288 strings.x \
289 strorder.x \
290 strports.x \
291 struct.x \
292 symbols.x \
293 threads.x \
294 throw.x \
0f458a37 295 trees.x \
476b894c 296 uniform.x \
a4a0d399
AW
297 values.x \
298 variable.x \
299 vectors.x \
300 version.x \
301 vports.x \
302 weaks.x
8bee78b3 303
83495480
AW
304# vm-related snarfs
305DOT_X_FILES += frames.x instructions.x objcodes.x programs.x vm.x
306
e9e225e5 307EXTRA_DOT_X_FILES = @EXTRA_DOT_X_FILES@
8bee78b3 308
a4a0d399
AW
309DOT_DOC_FILES = \
310 alist.doc \
311 arbiters.doc \
c53c0893 312 array-handle.doc \
5d1b3b2d 313 array-map.doc \
2fa901a5 314 arrays.doc \
a4a0d399
AW
315 async.doc \
316 backtrace.doc \
317 boolean.doc \
cf396142 318 bitvectors.doc \
a4a0d399
AW
319 bytevectors.doc \
320 chars.doc \
b9c100d0 321 control.doc \
a4a0d399
AW
322 continuations.doc \
323 debug.doc \
324 deprecated.doc \
325 deprecation.doc \
326 discouraged.doc \
327 dynl.doc \
328 dynwind.doc \
329 eq.doc \
330 error.doc \
331 eval.doc \
332 evalext.doc \
333 extensions.doc \
334 feature.doc \
335 fluids.doc \
e2c2a699 336 foreign.doc \
a4a0d399 337 fports.doc \
a4a0d399 338 gc-malloc.doc \
a4a0d399
AW
339 gc.doc \
340 gettext.doc \
1030b450 341 generalized-arrays.doc \
476b894c 342 generalized-vectors.doc \
a4a0d399
AW
343 goops.doc \
344 gsubr.doc \
345 guardians.doc \
346 hash.doc \
347 hashtab.doc \
348 hooks.doc \
349 i18n.doc \
350 init.doc \
351 ioext.doc \
352 keywords.doc \
353 lang.doc \
354 list.doc \
355 load.doc \
356 macros.doc \
357 mallocs.doc \
b7742c6b 358 memoize.doc \
a4a0d399
AW
359 modules.doc \
360 numbers.doc \
a4a0d399
AW
361 objprop.doc \
362 options.doc \
363 pairs.doc \
364 ports.doc \
365 print.doc \
366 procprop.doc \
367 procs.doc \
7b893819 368 promises.doc \
a4a0d399
AW
369 properties.doc \
370 r6rs-ports.doc \
a4a0d399
AW
371 random.doc \
372 rdelim.doc \
373 read.doc \
374 root.doc \
375 rw.doc \
376 scmsigs.doc \
377 script.doc \
378 simpos.doc \
379 smob.doc \
380 sort.doc \
381 srcprop.doc \
382 srfi-13.doc \
383 srfi-14.doc \
384 srfi-4.doc \
385 stackchk.doc \
386 stacks.doc \
387 stime.doc \
388 strings.doc \
389 strorder.doc \
390 strports.doc \
391 struct.doc \
392 symbols.doc \
393 threads.doc \
394 throw.doc \
0f458a37 395 trees.doc \
476b894c 396 uniform.doc \
a4a0d399
AW
397 values.doc \
398 variable.doc \
399 vectors.doc \
400 version.doc \
401 vports.doc \
402 weaks.doc
a3365d47 403
2ce88b54 404EXTRA_DOT_DOC_FILES = @EXTRA_DOT_DOC_FILES@
9515eae6 405
83495480
AW
406DOT_I_FILES = vm-i-system.i vm-i-scheme.i vm-i-loader.i
407
408.c.i:
5c146363 409 $(GREP) '^VM_DEFINE' $< > $@
83495480 410
64c2db80
RB
411BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h \
412 version.h scmconfig.h \
83495480 413 $(DOT_I_FILES) $(DOT_X_FILES) $(EXTRA_DOT_X_FILES)
9515eae6 414
44602b08 415EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = _scm.h \
c32b39b9 416 memmove.c strerror.c \
f731051e
MV
417 dynl.c regex-posix.c \
418 filesys.c posix.c net_db.c socket.c \
29627818 419 debug-malloc.c mkstemp.c \
b89c4943
LC
420 win32-uname.c win32-dirent.c win32-socket.c \
421 locale-categories.h
7bfd3b9e 422
413a1367
ML
423## delete guile-snarf.awk from the installation bindir, in case it's
424## lingering there due to an earlier guile version not having been
425## wiped out.
426install-exec-hook:
b27b814d 427 rm -f $(DESTDIR)$(bindir)/guile-snarf.awk
413a1367 428
7bfd3b9e 429## This is kind of nasty... there are ".c" files that we don't want to
1be6b49c
ML
430## compile, since they are #included. So instead we list them here.
431## Perhaps we can deal with them normally once the merge seems to be
432## working.
4b126598 433noinst_HEADERS = conv-integer.i.c conv-uinteger.i.c \
71560395 434 ieee-754.h \
71560395 435 srfi-14.i.c \
06f9c814 436 quicksort.i.c \
340c49bf 437 win32-uname.h win32-dirent.h win32-socket.h \
981ff600 438 private-gc.h private-options.h
7bfd3b9e 439
83495480
AW
440# vm instructions
441noinst_HEADERS += vm-engine.c vm-i-system.c vm-i-scheme.c vm-i-loader.c
442
44602b08
AW
443libguile_@GUILE_EFFECTIVE_VERSION@_la_DEPENDENCIES = @LIBLOBJS@
444libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD = \
f29ded4b 445 @LIBLOBJS@ $(gnulib_library) $(LTLIBGMP) \
2bfa4d5c 446 $(LTLIBUNISTRING) $(LTLIBICONV) $(LTLIBINTL)
44602b08 447libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS = \
61cd9dc9
LC
448 @LTLIBINTL@ $(LIBFFI_LIBS) $(INET_NTOP_LIB) $(INET_PTON_LIB) \
449 $(GETADDRINFO_LIB) $(HOSTENT_LIB) $(SERVENT_LIB) \
76e8a758 450 -version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ \
61cd9dc9 451 -export-dynamic -no-undefined \
76e8a758 452 $(GNU_LD_FLAGS)
733943b9 453
9af080f7
LC
454if HAVE_LD_VERSION_SCRIPT
455
44602b08 456libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS += -Wl,--version-script="$(srcdir)/libguile.map"
9af080f7
LC
457
458endif HAVE_LD_VERSION_SCRIPT
459
460
54f16aec 461# These are headers visible as <guile/mumble.h>
89bc270d 462pkginclude_HEADERS =
ee2a8b9b 463
733943b9 464# These are headers visible as <libguile/mumble.h>.
718815d7 465modincludedir = $(pkgincludedir)/$(GUILE_EFFECTIVE_VERSION)/libguile
a4a0d399
AW
466modinclude_HEADERS = \
467 __scm.h \
468 alist.h \
469 arbiters.h \
c53c0893 470 array-handle.h \
5d1b3b2d 471 array-map.h \
2fa901a5 472 arrays.h \
a4a0d399
AW
473 async.h \
474 backtrace.h \
1c44468d 475 bdw-gc.h \
a4a0d399 476 boolean.h \
cf396142 477 bitvectors.h \
a4a0d399
AW
478 bytevectors.h \
479 chars.h \
b9c100d0 480 control.h \
a4a0d399
AW
481 continuations.h \
482 debug-malloc.h \
483 debug.h \
484 deprecated.h \
485 deprecation.h \
486 discouraged.h \
487 dynl.h \
488 dynwind.h \
489 eq.h \
490 error.h \
491 eval.h \
492 evalext.h \
493 extensions.h \
494 feature.h \
495 filesys.h \
496 fluids.h \
e2c2a699 497 foreign.h \
a4a0d399
AW
498 fports.h \
499 frames.h \
a4a0d399
AW
500 gc.h \
501 gdb_interface.h \
502 gdbint.h \
503 gettext.h \
1030b450 504 generalized-arrays.h \
f332e957 505 generalized-vectors.h \
a4a0d399
AW
506 goops.h \
507 gsubr.h \
508 guardians.h \
509 hash.h \
510 hashtab.h \
511 hooks.h \
512 i18n.h \
513 init.h \
514 inline.h \
515 instructions.h \
516 ioext.h \
517 iselect.h \
518 keywords.h \
519 lang.h \
520 list.h \
521 load.h \
522 macros.h \
523 mallocs.h \
b7742c6b 524 memoize.h \
a4a0d399
AW
525 modules.h \
526 net_db.h \
527 null-threads.h \
528 numbers.h \
529 objcodes.h \
a4a0d399
AW
530 objprop.h \
531 options.h \
532 pairs.h \
533 ports.h \
534 posix.h \
535 print.h \
536 procprop.h \
537 procs.h \
538 programs.h \
7b893819 539 promises.h \
a4a0d399
AW
540 properties.h \
541 pthread-threads.h \
542 r6rs-ports.h \
a4a0d399
AW
543 random.h \
544 rdelim.h \
545 read.h \
546 regex-posix.h \
547 root.h \
548 rw.h \
549 scmsigs.h \
550 script.h \
551 simpos.h \
552 smob.h \
553 snarf.h \
554 socket.h \
555 sort.h \
556 srcprop.h \
557 srfi-13.h \
558 srfi-14.h \
559 srfi-4.h \
560 stackchk.h \
561 stacks.h \
562 stime.h \
563 strings.h \
564 strorder.h \
565 strports.h \
566 struct.h \
567 symbols.h \
568 tags.h \
569 threads.h \
570 throw.h \
0f458a37 571 trees.h \
a4a0d399 572 validate.h \
476b894c 573 uniform.h \
a4a0d399
AW
574 values.h \
575 variable.h \
576 vectors.h \
a4a0d399
AW
577 vm-engine.h \
578 vm-expand.h \
579 vm.h \
580 vports.h \
581 weaks.h
83495480 582
93ff93f6 583nodist_modinclude_HEADERS = version.h scmconfig.h
733943b9 584
604a672e
TTN
585bin_SCRIPTS = guile-snarf
586
f94b6524
TTN
587# We can re-enable install for some of these if/when they are documented
588# and people feel like maintaining them. For now, this is not the case.
604a672e 589noinst_SCRIPTS = guile-doc-snarf guile-snarf-docs guile-func-name-check
adb75a41 590
89bc270d 591EXTRA_DIST = ChangeLog-scm ChangeLog-threads \
61db429e
LC
592 ChangeLog-1996-1999 ChangeLog-2000 ChangeLog-2008 cpp_signal.c \
593 cpp_errno.c cpp_err_symbols.in cpp_err_symbols.c \
594 cpp_sig_symbols.c cpp_sig_symbols.in cpp_cnvt.awk \
595 c-tokenize.lex version.h.in \
f49dbcad 596 scmconfig.h.top libgettext.h unidata_to_charset.pl libguile.map
c99f9605
ML
597# $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \
598# guile-procedures.txt guile.texi
733943b9 599
d8a20ddb
RB
600## We use @-...-@ as the substitution brackets here, instead of the
601## usual @...@, so autoconf doesn't go and substitute the values
602## directly into the left-hand sides of the sed substitutions. *sigh*
c66fe8a9 603version.h: version.h.in $(top_builddir)/config.status
8ab3d8a0 604 sed < $(srcdir)/version.h.in > $@.tmp \
d8a20ddb
RB
605 -e s:@-GUILE_MAJOR_VERSION-@:${GUILE_MAJOR_VERSION}: \
606 -e s:@-GUILE_MINOR_VERSION-@:${GUILE_MINOR_VERSION}: \
89607fab
AW
607 -e s:@-GUILE_MICRO_VERSION-@:${GUILE_MICRO_VERSION}: \
608 -e s:@-GUILE_EFFECTIVE_VERSION-@:${GUILE_EFFECTIVE_VERSION}:
d8a20ddb
RB
609 mv $@.tmp $@
610
fef07353 611## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
90ff3ec5 612libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
54f16aec 613 @echo "Generating libpath.h..."
e151bee6
JB
614 @rm -f libpath.tmp
615 @echo '/* generated by Makefile */' > libpath.tmp
616 @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
d8a20ddb 617 @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)"'>>libpath.tmp
e151bee6 618 @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
28af5ee5
AW
619 @echo '#define SCM_LIB_DIR "$(libdir)"' >> libpath.tmp
620 @echo '#define SCM_EXTENSIONS_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/extensions"' >> libpath.tmp
5b197db8
AW
621 @echo '#define SCM_CCACHE_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/ccache"' >> libpath.tmp
622 @echo '#define SCM_EFFECTIVE_VERSION "$(GUILE_EFFECTIVE_VERSION)"' >> libpath.tmp
e151bee6
JB
623 @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp
624 @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp
c565712c 625 @echo ' { "top_srcdir", "@top_srcdir_absolute@" }, \' >> libpath.tmp
e151bee6
JB
626 @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp
627 @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp
628 @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp
629 @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp
630 @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp
631 @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp
632 @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp
633 @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp
634 @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp
635 @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp
5b197db8 636 @echo ' { "ccachedir", SCM_CCACHE_DIR }, \' >> libpath.tmp
e151bee6
JB
637 @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp
638 @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp
639 @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp
eb350124
AW
640 @echo ' { "pkgdatadir", "$(pkgdatadir)" }, \' >> libpath.tmp
641 @echo ' { "pkglibdir", "$(pkglibdir)" }, \' >> libpath.tmp
642 @echo ' { "pkgincludedir", "$(pkgincludedir)" }, \' \
e151bee6 643 >> libpath.tmp
28af5ee5 644 @echo ' { "extensionsdir", "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/extensions" }, \' >> libpath.tmp
b6fae158 645 @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp
54f16aec
TTN
646 @echo ' { "libguileinterface", "@LIBGUILE_INTERFACE@" }, \' \
647 >> libpath.tmp
30dda257 648 @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp
5bbc5359 649 @echo ' { "CFLAGS", "@GUILE_CFLAGS@" }, \' >> libpath.tmp
54f16aec 650 @echo ' { "buildstamp", "'"`date`"'" }, \' >> libpath.tmp
e151bee6
JB
651 @echo '}' >> libpath.tmp
652 @mv libpath.tmp libpath.h
733943b9 653
3dc81fba 654
47871d5a 655snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
e9c3d3f9 656
3dc81fba 657SUFFIXES = .x .doc
733943b9 658.c.x:
2c7a286a 659 ./guile-snarf -o $@ $< $(snarfcppopts)
c99f9605 660.c.doc:
23d72566 661 -$(AWK) -f ./guile-func-name-check $<
e9c3d3f9 662 (./guile-snarf-docs $(snarfcppopts) $< | \
af68e5e5 663 ./guile_filter_doc_snarfage$(EXEEXT) --filter-snarfage) > $@ || { rm $@; false; }
733943b9 664
23f2b9a3 665$(DOT_X_FILES) $(EXTRA_DOT_X_FILES): scmconfig.h snarf.h guile-snarf.in
c99f9605 666
23f2b9a3 667$(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES): scmconfig.h snarf.h guile-snarf-docs.in guile_filter_doc_snarfage$(EXEEXT)
66418d34 668
faf6a29b
MV
669error.x: cpp_err_symbols.c
670posix.x: cpp_sig_symbols.c
671load.x: libpath.h
672
f8241358 673alldotdocfiles = $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES)
e27f640a 674snarf2checkedtexi = GUILE_AUTO_COMPILE=0 $(top_builddir)/meta/uninstalled-env guile-tools snarf-check-and-output-texi
f8241358
TTN
675dotdoc2texi = cat $(alldotdocfiles) | $(snarf2checkedtexi)
676
2e945bcc 677guile.texi: $(alldotdocfiles) guile$(EXEEXT)
f8241358
TTN
678 $(dotdoc2texi) --manual > $@ || { rm $@; false; }
679
2e945bcc 680guile-procedures.texi: $(alldotdocfiles) guile$(EXEEXT)
f8241358 681 $(dotdoc2texi) > $@ || { rm $@; false; }
9d29e990 682
9df3eecc
MV
683if HAVE_MAKEINFO
684
cecb4a5e 685guile-procedures.txt: guile-procedures.texi
9d29e990 686 rm -f $@
f7742034 687 makeinfo --force -o $@ guile-procedures.texi || test -f $@
4079f87e 688
9df3eecc
MV
689else
690
691guile-procedures.txt: guile-procedures.texi
f7742034 692 cp guile-procedures.texi $@
9df3eecc
MV
693
694endif
695
30e3be5a 696c-tokenize.c: c-tokenize.lex
47ac1e47 697 flex -t $(srcdir)/c-tokenize.lex > $@ || { rm $@; false; }
30e3be5a 698
d8a20ddb 699schemelibdir = $(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)
8dc9439f 700schemelib_DATA = guile-procedures.txt
4079f87e 701
733943b9 702## Add -MG to make the .x magic work with auto-dep code.
47871d5a 703MKDEP = gcc -M -MG $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
ee78fbb0 704
a9c093e2 705cpp_err_symbols.c: cpp_err_symbols.in cpp_cnvt.awk
a0e90145 706 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \
593d151f
JB
707 cpp_err_symbols.tmp
708 mv cpp_err_symbols.tmp cpp_err_symbols.c
ee78fbb0 709
a9c093e2 710cpp_sig_symbols.c: cpp_sig_symbols.in cpp_cnvt.awk
a0e90145 711 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \
593d151f
JB
712 cpp_sig_symbols.tmp
713 mv cpp_sig_symbols.tmp cpp_sig_symbols.c
67ec3667 714
a0e90145 715## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX
67ec3667
GH
716## macros defined on this platform.
717check_signals:
5c146363 718 gcc -undef -dM -E $(srcdir)/cpp_signal.c | $(EGREP) ' SIG[A-Z]+' \
67ec3667 719 | cut -f2 -d' ' | sort > cpp_sig_symbols_here
a0e90145 720 diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \
5c146363 721 | $(EGREP) '^\+S' \
67ec3667
GH
722 | cut -c2- > cpp_sig_symbols_diff
723 if test -s cpp_sig_symbols_diff ; then \
a0e90145 724 cat $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_diff \
67ec3667
GH
725 | sort > cpp_sig_symbols_new ;\
726 echo "cpp_sig_symbols_new has the following additions:" ;\
727 cat cpp_sig_symbols_diff ;\
728 else echo "No new symbols found."; \
729 fi
730
a0e90145 731## Likewise for cpp_err_symbols.in.
67ec3667 732check_errnos:
5c146363 733 gcc -undef -dM -E $(srcdir)/cpp_errno.c | $(EGREP) ' E.+' \
67ec3667 734 | cut -f2 -d' ' | sort > cpp_err_symbols_here
a0e90145 735 diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \
5c146363 736 | $(EGREP) '^\+E' \
67ec3667
GH
737 | cut -c2- > cpp_err_symbols_diff
738 if test -s cpp_err_symbols_diff ; then \
a0e90145 739 cat $(srcdir)/cpp_err_symbols.in cpp_err_symbols_diff \
67ec3667
GH
740 | sort > cpp_err_symbols_new ;\
741 echo "cpp_err_symbols_new has the following additions:" ;\
742 cat cpp_err_symbols_diff ;\
743 else echo "No new symbols found."; \
744 fi
745
ad6b30a0
TP
746MOSTLYCLEANFILES = \
747 cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \
d8a20ddb
RB
748 cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new \
749 version.h version.h.tmp \
23ccb831 750 scmconfig.h scmconfig.h.tmp
ad6b30a0 751
84595266
AW
752CLEANFILES = libpath.h *.x *.doc guile-procedures.txt guile-procedures.texi guile.texi \
753 vm-i-*.i
ee0c0e03
ML
754
755MAINTAINERCLEANFILES = c-tokenize.c