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