Revert "eval is actually compile"
[bpt/guile.git] / libguile / Makefile.am
CommitLineData
733943b9 1## Process this file with Automake to create Makefile.in
2764bd99 2##
7ca96180 3## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 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) \
47871d5a 36 -I$(top_srcdir)/lib -I$(top_builddir)/lib
6caac03c 37
442f3f20 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
b89c4943
LC
46lib_LTLIBRARIES = libguile.la \
47 libguile-i18n-v-@LIBGUILE_I18N_MAJOR@.la
f94b6524 48bin_PROGRAMS = guile
b32fca0f 49
64c2db80
RB
50noinst_PROGRAMS = guile_filter_doc_snarfage gen-scmconfig
51
52gen_scmconfig_SOURCES = gen-scmconfig.c
53
54## Override default rule; this should be compiled for BUILD host.
55## For some reason, OBJEXT does not include the dot
56gen-scmconfig.$(OBJEXT): gen-scmconfig.c
57 if [ "$(cross_compiling)" = "yes" ]; then \
47871d5a 58 $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) -c -o $@ $<; \
64c2db80
RB
59 else \
60 $(COMPILE) -c -o $@ $<; \
61 fi
62
2e945bcc
SJ
63## Override default rule; this should run on BUILD host.
64gen-scmconfig$(EXEEXT): $(gen_scmconfig_OBJECTS) $(gen_scmconfig_DEPENDENCIES)
65 @rm -f gen-scmconfig$(EXEEXT)
66 if [ "$(cross_compiling)" = "yes" ]; then \
67 $(CCLD_FOR_BUILD) -o $@ $(gen_scmconfig_OBJECTS); \
68 else \
69 $(LINK) $(gen_scmconfig_OBJECTS) $(LDADD) $(LIBS); \
70 fi
71
72scmconfig.h: ${top_builddir}/config.h gen-scmconfig$(EXEEXT)
64c2db80 73 rm -f scmconfig.h.tmp
eaf94f77 74 cat $(srcdir)/scmconfig.h.top > scmconfig.h.tmp
2e945bcc 75 ./gen-scmconfig$(EXEEXT) >> scmconfig.h.tmp
64c2db80
RB
76 chmod 444 scmconfig.h.tmp
77 rm -f scmconfig.h
78 mv scmconfig.h.tmp scmconfig.h
79
b32fca0f
MV
80guile_filter_doc_snarfage_SOURCES = c-tokenize.c
81
82## Override default rule; this should be compiled for BUILD host.
83## For some reason, OBJEXT does not include the dot
84c-tokenize.$(OBJEXT): c-tokenize.c
85 if [ "$(cross_compiling)" = "yes" ]; then \
47871d5a 86 $(CC_FOR_BUILD) $(DEFS) $(AM_CPPFLAGS) -c -o $@ $<; \
b32fca0f 87 else \
d3518113 88 $(filter-out -Werror,$(COMPILE)) -c -o $@ $<; \
b32fca0f
MV
89 fi
90
91## Override default rule; this should run on BUILD host.
92guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS) $(guile_filter_doc_snarfage_DEPENDENCIES)
93 @rm -f guile_filter_doc_snarfage$(EXEEXT)
94 if [ "$(cross_compiling)" = "yes" ]; then \
95 $(CCLD_FOR_BUILD) -o $@ $(guile_filter_doc_snarfage_OBJECTS); \
96 else \
97 $(LINK) $(guile_filter_doc_snarfage_OBJECTS) $(LDADD) $(LIBS); \
98 fi
99
549436de
JB
100
101guile_SOURCES = guile.c
582a4997 102guile_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
8f99e3f3 103guile_LDADD = libguile.la
de7d32d0 104guile_LDFLAGS = $(GUILE_CFLAGS)
5bbc5359 105
582a4997 106libguile_la_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
ee2a8b9b 107
a4a0d399
AW
108libguile_la_SOURCES = \
109 alist.c \
110 arbiters.c \
c53c0893 111 array-handle.c \
5d1b3b2d 112 array-map.c \
2fa901a5 113 arrays.c \
a4a0d399
AW
114 async.c \
115 backtrace.c \
116 boolean.c \
cf396142 117 bitvectors.c \
a4a0d399
AW
118 bytevectors.c \
119 chars.c \
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 \
133 fports.c \
134 frames.c \
135 futures.c \
136 gc-card.c \
137 gc-freelist.c \
138 gc-malloc.c \
139 gc-mark.c \
140 gc-segment-table.c \
141 gc-segment.c \
142 gc.c \
143 gc_os_dep.c \
144 gdbint.c \
145 gettext.c \
1030b450 146 generalized-arrays.c \
f332e957 147 generalized-vectors.c \
a4a0d399
AW
148 goops.c \
149 gsubr.c \
150 guardians.c \
151 hash.c \
152 hashtab.c \
153 hooks.c \
154 init.c \
155 inline.c \
156 instructions.c \
157 ioext.c \
158 keywords.c \
159 lang.c \
160 list.c \
161 load.c \
162 macros.c \
163 mallocs.c \
164 modules.c \
165 null-threads.c \
166 numbers.c \
167 objcodes.c \
168 objects.c \
169 objprop.c \
170 options.c \
171 pairs.c \
172 ports.c \
173 print.c \
174 procprop.c \
175 procs.c \
176 programs.c \
177 properties.c \
178 r6rs-ports.c \
a4a0d399
AW
179 random.c \
180 rdelim.c \
181 read.c \
182 root.c \
183 rw.c \
184 scmsigs.c \
185 script.c \
186 simpos.c \
187 smob.c \
188 sort.c \
189 srcprop.c \
190 srfi-13.c \
191 srfi-14.c \
192 srfi-4.c \
193 stackchk.c \
194 stacks.c \
195 stime.c \
196 strings.c \
197 strorder.c \
198 strports.c \
199 struct.c \
200 symbols.c \
201 threads.c \
202 throw.c \
476b894c 203 uniform.c \
a4a0d399
AW
204 values.c \
205 variable.c \
206 vectors.c \
207 version.c \
208 vm.c \
209 vports.c \
210 weaks.c
83495480 211
b89c4943
LC
212libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_SOURCES = i18n.c
213libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_CFLAGS = \
214 $(libguile_la_CFLAGS)
215libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD = \
6caac03c 216 libguile.la $(gnulib_library)
b89c4943
LC
217libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LDFLAGS = \
218 -module -L$(builddir) -lguile \
219 -version-info @LIBGUILE_I18N_INTERFACE@
220
a4a0d399
AW
221DOT_X_FILES = \
222 alist.x \
223 arbiters.x \
c53c0893 224 array-handle.x \
5d1b3b2d 225 array-map.x \
2fa901a5 226 arrays.x \
a4a0d399
AW
227 async.x \
228 backtrace.x \
229 boolean.x \
cf396142 230 bitvectors.x \
a4a0d399
AW
231 bytevectors.x \
232 chars.x \
233 continuations.x \
234 debug.x \
235 deprecated.x \
236 deprecation.x \
237 discouraged.x \
238 dynl.x \
239 dynwind.x \
240 eq.x \
241 error.x \
242 eval.x \
243 evalext.x \
244 extensions.x \
245 feature.x \
246 fluids.x \
247 fports.x \
248 futures.x \
249 gc-card.x \
250 gc-malloc.x \
251 gc-mark.x \
252 gc-segment-table.x \
253 gc-segment.x \
254 gc.x \
255 gettext.x \
1030b450 256 generalized-arrays.x \
f332e957 257 generalized-vectors.x \
a4a0d399
AW
258 goops.x \
259 gsubr.x \
260 guardians.x \
261 hash.x \
262 hashtab.x \
263 hooks.x \
264 i18n.x \
265 init.x \
266 ioext.x \
267 keywords.x \
268 lang.x \
269 list.x \
270 load.x \
271 macros.x \
272 mallocs.x \
273 modules.x \
274 numbers.x \
275 objects.x \
276 objprop.x \
277 options.x \
278 pairs.x \
279 ports.x \
280 print.x \
281 procprop.x \
282 procs.x \
283 properties.x \
284 r6rs-ports.x \
a4a0d399
AW
285 random.x \
286 rdelim.x \
287 read.x \
288 root.x \
289 rw.x \
290 scmsigs.x \
291 script.x \
292 simpos.x \
293 smob.x \
294 sort.x \
295 srcprop.x \
296 srfi-13.x \
297 srfi-14.x \
298 srfi-4.x \
299 stackchk.x \
300 stacks.x \
301 stime.x \
302 strings.x \
303 strorder.x \
304 strports.x \
305 struct.x \
306 symbols.x \
307 threads.x \
308 throw.x \
476b894c 309 uniform.x \
a4a0d399
AW
310 values.x \
311 variable.x \
312 vectors.x \
313 version.x \
314 vports.x \
315 weaks.x
8bee78b3 316
83495480
AW
317# vm-related snarfs
318DOT_X_FILES += frames.x instructions.x objcodes.x programs.x vm.x
319
e9e225e5 320EXTRA_DOT_X_FILES = @EXTRA_DOT_X_FILES@
8bee78b3 321
a4a0d399
AW
322DOT_DOC_FILES = \
323 alist.doc \
324 arbiters.doc \
c53c0893 325 array-handle.doc \
5d1b3b2d 326 array-map.doc \
2fa901a5 327 arrays.doc \
a4a0d399
AW
328 async.doc \
329 backtrace.doc \
330 boolean.doc \
cf396142 331 bitvectors.doc \
a4a0d399
AW
332 bytevectors.doc \
333 chars.doc \
334 continuations.doc \
335 debug.doc \
336 deprecated.doc \
337 deprecation.doc \
338 discouraged.doc \
339 dynl.doc \
340 dynwind.doc \
341 eq.doc \
342 error.doc \
343 eval.doc \
344 evalext.doc \
345 extensions.doc \
346 feature.doc \
347 fluids.doc \
348 fports.doc \
349 futures.doc \
350 gc-card.doc \
351 gc-malloc.doc \
352 gc-mark.doc \
353 gc-segment-table.doc \
354 gc-segment.doc \
355 gc.doc \
356 gettext.doc \
1030b450 357 generalized-arrays.doc \
476b894c 358 generalized-vectors.doc \
a4a0d399
AW
359 goops.doc \
360 gsubr.doc \
361 guardians.doc \
362 hash.doc \
363 hashtab.doc \
364 hooks.doc \
365 i18n.doc \
366 init.doc \
367 ioext.doc \
368 keywords.doc \
369 lang.doc \
370 list.doc \
371 load.doc \
372 macros.doc \
373 mallocs.doc \
374 modules.doc \
375 numbers.doc \
376 objects.doc \
377 objprop.doc \
378 options.doc \
379 pairs.doc \
380 ports.doc \
381 print.doc \
382 procprop.doc \
383 procs.doc \
384 properties.doc \
385 r6rs-ports.doc \
a4a0d399
AW
386 random.doc \
387 rdelim.doc \
388 read.doc \
389 root.doc \
390 rw.doc \
391 scmsigs.doc \
392 script.doc \
393 simpos.doc \
394 smob.doc \
395 sort.doc \
396 srcprop.doc \
397 srfi-13.doc \
398 srfi-14.doc \
399 srfi-4.doc \
400 stackchk.doc \
401 stacks.doc \
402 stime.doc \
403 strings.doc \
404 strorder.doc \
405 strports.doc \
406 struct.doc \
407 symbols.doc \
408 threads.doc \
409 throw.doc \
476b894c 410 uniform.doc \
a4a0d399
AW
411 values.doc \
412 variable.doc \
413 vectors.doc \
414 version.doc \
415 vports.doc \
416 weaks.doc
a3365d47 417
2ce88b54 418EXTRA_DOT_DOC_FILES = @EXTRA_DOT_DOC_FILES@
9515eae6 419
83495480
AW
420DOT_I_FILES = vm-i-system.i vm-i-scheme.i vm-i-loader.i
421
422.c.i:
423 grep '^VM_DEFINE' $< > $@
424
64c2db80
RB
425BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h \
426 version.h scmconfig.h \
83495480 427 $(DOT_I_FILES) $(DOT_X_FILES) $(EXTRA_DOT_X_FILES)
9515eae6 428
f731051e
MV
429EXTRA_libguile_la_SOURCES = _scm.h \
430 inet_aton.c memmove.c putenv.c strerror.c \
431 dynl.c regex-posix.c \
432 filesys.c posix.c net_db.c socket.c \
b89c4943
LC
433 debug-malloc.c mkstemp.c \
434 win32-uname.c win32-dirent.c win32-socket.c \
435 locale-categories.h
7bfd3b9e 436
413a1367
ML
437## delete guile-snarf.awk from the installation bindir, in case it's
438## lingering there due to an earlier guile version not having been
439## wiped out.
440install-exec-hook:
b27b814d 441 rm -f $(DESTDIR)$(bindir)/guile-snarf.awk
413a1367 442
7bfd3b9e 443## This is kind of nasty... there are ".c" files that we don't want to
1be6b49c
ML
444## compile, since they are #included. So instead we list them here.
445## Perhaps we can deal with them normally once the merge seems to be
446## working.
4b126598 447noinst_HEADERS = conv-integer.i.c conv-uinteger.i.c \
1ee2c72e 448 eval.i.c ieee-754.h \
02e22775 449 srfi-4.i.c \
06f9c814 450 quicksort.i.c \
340c49bf 451 win32-uname.h win32-dirent.h win32-socket.h \
03291373 452 private-gc.h private-options.h
7bfd3b9e 453
83495480
AW
454# vm instructions
455noinst_HEADERS += vm-engine.c vm-i-system.c vm-i-scheme.c vm-i-loader.c
456
78bda5f3 457libguile_la_DEPENDENCIES = @LIBLOBJS@
f4863880 458libguile_la_LIBADD = @LIBLOBJS@ $(gnulib_library) $(LTLIBGMP) $(LTLIBUNISTRING)
88686555 459libguile_la_LDFLAGS = @LTLIBINTL@ -version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ -export-dynamic -no-undefined
733943b9 460
9af080f7
LC
461if HAVE_LD_VERSION_SCRIPT
462
463libguile_la_LDFLAGS += -Wl,--version-script="$(srcdir)/libguile.map"
464
465endif HAVE_LD_VERSION_SCRIPT
466
467
54f16aec 468# These are headers visible as <guile/mumble.h>
89bc270d 469pkginclude_HEADERS =
ee2a8b9b 470
733943b9 471# These are headers visible as <libguile/mumble.h>.
5380de6b 472modincludedir = $(includedir)/libguile
a4a0d399
AW
473modinclude_HEADERS = \
474 __scm.h \
475 alist.h \
476 arbiters.h \
c53c0893 477 array-handle.h \
5d1b3b2d 478 array-map.h \
2fa901a5 479 arrays.h \
a4a0d399
AW
480 async.h \
481 backtrace.h \
482 boolean.h \
cf396142 483 bitvectors.h \
a4a0d399
AW
484 bytevectors.h \
485 chars.h \
486 continuations.h \
487 debug-malloc.h \
488 debug.h \
489 deprecated.h \
490 deprecation.h \
491 discouraged.h \
492 dynl.h \
493 dynwind.h \
494 eq.h \
495 error.h \
496 eval.h \
497 evalext.h \
498 extensions.h \
499 feature.h \
500 filesys.h \
501 fluids.h \
502 fports.h \
503 frames.h \
504 futures.h \
505 gc.h \
506 gdb_interface.h \
507 gdbint.h \
508 gettext.h \
1030b450 509 generalized-arrays.h \
f332e957 510 generalized-vectors.h \
a4a0d399
AW
511 goops.h \
512 gsubr.h \
513 guardians.h \
514 hash.h \
515 hashtab.h \
516 hooks.h \
517 i18n.h \
518 init.h \
519 inline.h \
520 instructions.h \
521 ioext.h \
522 iselect.h \
523 keywords.h \
524 lang.h \
525 list.h \
526 load.h \
527 macros.h \
528 mallocs.h \
529 modules.h \
530 net_db.h \
531 null-threads.h \
532 numbers.h \
533 objcodes.h \
534 objects.h \
535 objprop.h \
536 options.h \
537 pairs.h \
538 ports.h \
539 posix.h \
540 print.h \
541 procprop.h \
542 procs.h \
543 programs.h \
544 properties.h \
545 pthread-threads.h \
546 r6rs-ports.h \
a4a0d399
AW
547 random.h \
548 rdelim.h \
549 read.h \
550 regex-posix.h \
551 root.h \
552 rw.h \
553 scmsigs.h \
554 script.h \
555 simpos.h \
556 smob.h \
557 snarf.h \
558 socket.h \
559 sort.h \
560 srcprop.h \
561 srfi-13.h \
562 srfi-14.h \
563 srfi-4.h \
564 stackchk.h \
565 stacks.h \
566 stime.h \
567 strings.h \
568 strorder.h \
569 strports.h \
570 struct.h \
571 symbols.h \
572 tags.h \
573 threads.h \
574 throw.h \
a4a0d399 575 validate.h \
476b894c 576 uniform.h \
a4a0d399
AW
577 values.h \
578 variable.h \
579 vectors.h \
580 vm-bootstrap.h \
581 vm-engine.h \
582 vm-expand.h \
583 vm.h \
584 vports.h \
585 weaks.h
83495480 586
93ff93f6 587nodist_modinclude_HEADERS = version.h scmconfig.h
733943b9 588
604a672e
TTN
589bin_SCRIPTS = guile-snarf
590
f94b6524
TTN
591# We can re-enable install for some of these if/when they are documented
592# and people feel like maintaining them. For now, this is not the case.
604a672e 593noinst_SCRIPTS = guile-doc-snarf guile-snarf-docs guile-func-name-check
adb75a41 594
89bc270d 595EXTRA_DIST = ChangeLog-scm ChangeLog-threads \
61db429e
LC
596 ChangeLog-1996-1999 ChangeLog-2000 ChangeLog-2008 cpp_signal.c \
597 cpp_errno.c cpp_err_symbols.in cpp_err_symbols.c \
598 cpp_sig_symbols.c cpp_sig_symbols.in cpp_cnvt.awk \
599 c-tokenize.lex version.h.in \
9af080f7 600 scmconfig.h.top libgettext.h libguile.map
c99f9605
ML
601# $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \
602# guile-procedures.txt guile.texi
733943b9 603
d8a20ddb
RB
604## We use @-...-@ as the substitution brackets here, instead of the
605## usual @...@, so autoconf doesn't go and substitute the values
606## directly into the left-hand sides of the sed substitutions. *sigh*
607version.h: version.h.in
8ab3d8a0 608 sed < $(srcdir)/version.h.in > $@.tmp \
d8a20ddb
RB
609 -e s:@-GUILE_MAJOR_VERSION-@:${GUILE_MAJOR_VERSION}: \
610 -e s:@-GUILE_MINOR_VERSION-@:${GUILE_MINOR_VERSION}: \
611 -e s:@-GUILE_MICRO_VERSION-@:${GUILE_MICRO_VERSION}:
612 mv $@.tmp $@
613
fef07353 614## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
90ff3ec5 615libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
54f16aec 616 @echo "Generating libpath.h..."
e151bee6
JB
617 @rm -f libpath.tmp
618 @echo '/* generated by Makefile */' > libpath.tmp
619 @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
d8a20ddb 620 @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)"'>>libpath.tmp
e151bee6 621 @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
5b197db8
AW
622 @echo '#define SCM_CCACHE_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/ccache"' >> libpath.tmp
623 @echo '#define SCM_EFFECTIVE_VERSION "$(GUILE_EFFECTIVE_VERSION)"' >> libpath.tmp
e151bee6
JB
624 @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp
625 @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp
c565712c 626 @echo ' { "top_srcdir", "@top_srcdir_absolute@" }, \' >> libpath.tmp
e151bee6
JB
627 @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp
628 @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp
629 @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp
630 @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp
631 @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp
632 @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp
633 @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp
634 @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp
635 @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp
636 @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp
5b197db8 637 @echo ' { "ccachedir", SCM_CCACHE_DIR }, \' >> libpath.tmp
e151bee6
JB
638 @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp
639 @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp
640 @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp
5b197db8
AW
641 @echo ' { "pkgdatadir", "@pkgdatadir@" }, \' >> libpath.tmp
642 @echo ' { "pkglibdir", "@pkglibdir@" }, \' >> libpath.tmp
643 @echo ' { "pkgincludedir", "@pkgincludedir@" }, \' \
e151bee6 644 >> 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:
718 gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \
719 | cut -f2 -d' ' | sort > cpp_sig_symbols_here
a0e90145
JB
720 diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \
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
GH
732check_errnos:
733 gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \
734 | cut -f2 -d' ' | sort > cpp_err_symbols_here
a0e90145
JB
735 diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \
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