factor copy-tree and cons-source out of eval.[ch]
[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 objprop.c \
162 options.c \
163 pairs.c \
164 ports.c \
165 print.c \
166 procprop.c \
167 procs.c \
168 programs.c \
169 properties.c \
170 r6rs-ports.c \
171 random.c \
172 rdelim.c \
173 read.c \
174 root.c \
175 rw.c \
176 scmsigs.c \
177 script.c \
178 simpos.c \
179 smob.c \
180 sort.c \
181 srcprop.c \
182 srfi-13.c \
183 srfi-14.c \
184 srfi-4.c \
185 stackchk.c \
186 stacks.c \
187 stime.c \
188 strings.c \
189 strorder.c \
190 strports.c \
191 struct.c \
192 symbols.c \
193 threads.c \
194 throw.c \
195 trees.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 objprop.x \
255 options.x \
256 pairs.x \
257 ports.x \
258 print.x \
259 procprop.x \
260 procs.x \
261 properties.x \
262 r6rs-ports.x \
263 random.x \
264 rdelim.x \
265 read.x \
266 root.x \
267 rw.x \
268 scmsigs.x \
269 script.x \
270 simpos.x \
271 smob.x \
272 sort.x \
273 srcprop.x \
274 srfi-13.x \
275 srfi-14.x \
276 srfi-4.x \
277 stackchk.x \
278 stacks.x \
279 stime.x \
280 strings.x \
281 strorder.x \
282 strports.x \
283 struct.x \
284 symbols.x \
285 threads.x \
286 throw.x \
287 trees.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 objprop.doc \
351 options.doc \
352 pairs.doc \
353 ports.doc \
354 print.doc \
355 procprop.doc \
356 procs.doc \
357 properties.doc \
358 r6rs-ports.doc \
359 random.doc \
360 rdelim.doc \
361 read.doc \
362 root.doc \
363 rw.doc \
364 scmsigs.doc \
365 script.doc \
366 simpos.doc \
367 smob.doc \
368 sort.doc \
369 srcprop.doc \
370 srfi-13.doc \
371 srfi-14.doc \
372 srfi-4.doc \
373 stackchk.doc \
374 stacks.doc \
375 stime.doc \
376 strings.doc \
377 strorder.doc \
378 strports.doc \
379 struct.doc \
380 symbols.doc \
381 threads.doc \
382 throw.doc \
383 trees.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 memmove.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 ieee-754.h \
423 srfi-4.i.c \
424 srfi-14.i.c \
425 quicksort.i.c \
426 win32-uname.h win32-dirent.h win32-socket.h \
427 private-gc.h private-options.h
428
429 # vm instructions
430 noinst_HEADERS += vm-engine.c vm-i-system.c vm-i-scheme.c vm-i-loader.c
431
432 libguile_la_DEPENDENCIES = @LIBLOBJS@
433 libguile_la_LIBADD = \
434 @LIBLOBJS@ $(gnulib_library) $(LTLIBGMP) \
435 $(LTLIBUNISTRING) $(LTLIBICONV)
436 libguile_la_LDFLAGS = \
437 @LTLIBINTL@ $(INET_NTOP_LIB) $(INET_PTON_LIB) \
438 -version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ \
439 -export-dynamic -no-undefined \
440 $(GNU_LD_FLAGS)
441
442 if HAVE_LD_VERSION_SCRIPT
443
444 libguile_la_LDFLAGS += -Wl,--version-script="$(srcdir)/libguile.map"
445
446 endif HAVE_LD_VERSION_SCRIPT
447
448
449 # These are headers visible as <guile/mumble.h>
450 pkginclude_HEADERS =
451
452 # These are headers visible as <libguile/mumble.h>.
453 modincludedir = $(includedir)/libguile
454 modinclude_HEADERS = \
455 __scm.h \
456 alist.h \
457 arbiters.h \
458 array-handle.h \
459 array-map.h \
460 arrays.h \
461 async.h \
462 backtrace.h \
463 bdw-gc.h \
464 boolean.h \
465 bitvectors.h \
466 bytevectors.h \
467 chars.h \
468 continuations.h \
469 debug-malloc.h \
470 debug.h \
471 deprecated.h \
472 deprecation.h \
473 discouraged.h \
474 dynl.h \
475 dynwind.h \
476 eq.h \
477 error.h \
478 eval.h \
479 evalext.h \
480 extensions.h \
481 feature.h \
482 filesys.h \
483 fluids.h \
484 fports.h \
485 frames.h \
486 gc.h \
487 gdb_interface.h \
488 gdbint.h \
489 gettext.h \
490 generalized-arrays.h \
491 generalized-vectors.h \
492 goops.h \
493 gsubr.h \
494 guardians.h \
495 hash.h \
496 hashtab.h \
497 hooks.h \
498 i18n.h \
499 init.h \
500 inline.h \
501 instructions.h \
502 ioext.h \
503 iselect.h \
504 keywords.h \
505 lang.h \
506 list.h \
507 load.h \
508 macros.h \
509 mallocs.h \
510 modules.h \
511 net_db.h \
512 null-threads.h \
513 numbers.h \
514 objcodes.h \
515 objprop.h \
516 options.h \
517 pairs.h \
518 ports.h \
519 posix.h \
520 print.h \
521 procprop.h \
522 procs.h \
523 programs.h \
524 properties.h \
525 pthread-threads.h \
526 r6rs-ports.h \
527 random.h \
528 rdelim.h \
529 read.h \
530 regex-posix.h \
531 root.h \
532 rw.h \
533 scmsigs.h \
534 script.h \
535 simpos.h \
536 smob.h \
537 snarf.h \
538 socket.h \
539 sort.h \
540 srcprop.h \
541 srfi-13.h \
542 srfi-14.h \
543 srfi-4.h \
544 stackchk.h \
545 stacks.h \
546 stime.h \
547 strings.h \
548 strorder.h \
549 strports.h \
550 struct.h \
551 symbols.h \
552 tags.h \
553 threads.h \
554 throw.h \
555 trees.h \
556 validate.h \
557 uniform.h \
558 values.h \
559 variable.h \
560 vectors.h \
561 vm-bootstrap.h \
562 vm-engine.h \
563 vm-expand.h \
564 vm.h \
565 vports.h \
566 weaks.h
567
568 nodist_modinclude_HEADERS = version.h scmconfig.h
569
570 bin_SCRIPTS = guile-snarf
571
572 # We can re-enable install for some of these if/when they are documented
573 # and people feel like maintaining them. For now, this is not the case.
574 noinst_SCRIPTS = guile-doc-snarf guile-snarf-docs guile-func-name-check
575
576 EXTRA_DIST = ChangeLog-scm ChangeLog-threads \
577 ChangeLog-1996-1999 ChangeLog-2000 ChangeLog-2008 cpp_signal.c \
578 cpp_errno.c cpp_err_symbols.in cpp_err_symbols.c \
579 cpp_sig_symbols.c cpp_sig_symbols.in cpp_cnvt.awk \
580 c-tokenize.lex version.h.in \
581 scmconfig.h.top libgettext.h unidata_to_charset.pl libguile.map
582 # $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \
583 # guile-procedures.txt guile.texi
584
585 ## We use @-...-@ as the substitution brackets here, instead of the
586 ## usual @...@, so autoconf doesn't go and substitute the values
587 ## directly into the left-hand sides of the sed substitutions. *sigh*
588 version.h: version.h.in
589 sed < $(srcdir)/version.h.in > $@.tmp \
590 -e s:@-GUILE_MAJOR_VERSION-@:${GUILE_MAJOR_VERSION}: \
591 -e s:@-GUILE_MINOR_VERSION-@:${GUILE_MINOR_VERSION}: \
592 -e s:@-GUILE_MICRO_VERSION-@:${GUILE_MICRO_VERSION}:
593 mv $@.tmp $@
594
595 ## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
596 libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
597 @echo "Generating libpath.h..."
598 @rm -f libpath.tmp
599 @echo '/* generated by Makefile */' > libpath.tmp
600 @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
601 @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)"'>>libpath.tmp
602 @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
603 @echo '#define SCM_LIB_DIR "$(libdir)"' >> libpath.tmp
604 @echo '#define SCM_EXTENSIONS_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/extensions"' >> libpath.tmp
605 @echo '#define SCM_CCACHE_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/ccache"' >> libpath.tmp
606 @echo '#define SCM_EFFECTIVE_VERSION "$(GUILE_EFFECTIVE_VERSION)"' >> libpath.tmp
607 @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp
608 @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp
609 @echo ' { "top_srcdir", "@top_srcdir_absolute@" }, \' >> libpath.tmp
610 @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp
611 @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp
612 @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp
613 @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp
614 @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp
615 @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp
616 @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp
617 @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp
618 @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp
619 @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp
620 @echo ' { "ccachedir", SCM_CCACHE_DIR }, \' >> libpath.tmp
621 @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp
622 @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp
623 @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp
624 @echo ' { "pkgdatadir", "$(pkgdatadir)" }, \' >> libpath.tmp
625 @echo ' { "pkglibdir", "$(pkglibdir)" }, \' >> libpath.tmp
626 @echo ' { "pkgincludedir", "$(pkgincludedir)" }, \' \
627 >> libpath.tmp
628 @echo ' { "extensionsdir", "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/extensions" }, \' >> libpath.tmp
629 @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp
630 @echo ' { "libguileinterface", "@LIBGUILE_INTERFACE@" }, \' \
631 >> libpath.tmp
632 @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp
633 @echo ' { "CFLAGS", "@GUILE_CFLAGS@" }, \' >> libpath.tmp
634 @echo ' { "buildstamp", "'"`date`"'" }, \' >> libpath.tmp
635 @echo '}' >> libpath.tmp
636 @mv libpath.tmp libpath.h
637
638
639 snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
640
641 SUFFIXES = .x .doc
642 .c.x:
643 ./guile-snarf -o $@ $< $(snarfcppopts)
644 .c.doc:
645 -$(AWK) -f ./guile-func-name-check $<
646 (./guile-snarf-docs $(snarfcppopts) $< | \
647 ./guile_filter_doc_snarfage$(EXEEXT) --filter-snarfage) > $@ || { rm $@; false; }
648
649 $(DOT_X_FILES) $(EXTRA_DOT_X_FILES): scmconfig.h snarf.h guile-snarf.in
650
651 $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES): scmconfig.h snarf.h guile-snarf-docs.in guile_filter_doc_snarfage$(EXEEXT)
652
653 error.x: cpp_err_symbols.c
654 posix.x: cpp_sig_symbols.c
655 load.x: libpath.h
656
657 alldotdocfiles = $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES)
658 snarf2checkedtexi = GUILE_AUTO_COMPILE=0 $(top_builddir)/meta/uninstalled-env guile-tools snarf-check-and-output-texi
659 dotdoc2texi = cat $(alldotdocfiles) | $(snarf2checkedtexi)
660
661 guile.texi: $(alldotdocfiles) guile$(EXEEXT)
662 $(dotdoc2texi) --manual > $@ || { rm $@; false; }
663
664 guile-procedures.texi: $(alldotdocfiles) guile$(EXEEXT)
665 $(dotdoc2texi) > $@ || { rm $@; false; }
666
667 if HAVE_MAKEINFO
668
669 guile-procedures.txt: guile-procedures.texi
670 rm -f $@
671 makeinfo --force -o $@ guile-procedures.texi || test -f $@
672
673 else
674
675 guile-procedures.txt: guile-procedures.texi
676 cp guile-procedures.texi $@
677
678 endif
679
680 c-tokenize.c: c-tokenize.lex
681 flex -t $(srcdir)/c-tokenize.lex > $@ || { rm $@; false; }
682
683 schemelibdir = $(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)
684 schemelib_DATA = guile-procedures.txt
685
686 ## Add -MG to make the .x magic work with auto-dep code.
687 MKDEP = gcc -M -MG $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
688
689 cpp_err_symbols.c: cpp_err_symbols.in cpp_cnvt.awk
690 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \
691 cpp_err_symbols.tmp
692 mv cpp_err_symbols.tmp cpp_err_symbols.c
693
694 cpp_sig_symbols.c: cpp_sig_symbols.in cpp_cnvt.awk
695 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \
696 cpp_sig_symbols.tmp
697 mv cpp_sig_symbols.tmp cpp_sig_symbols.c
698
699 ## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX
700 ## macros defined on this platform.
701 check_signals:
702 gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \
703 | cut -f2 -d' ' | sort > cpp_sig_symbols_here
704 diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \
705 | egrep '^\+S' \
706 | cut -c2- > cpp_sig_symbols_diff
707 if test -s cpp_sig_symbols_diff ; then \
708 cat $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_diff \
709 | sort > cpp_sig_symbols_new ;\
710 echo "cpp_sig_symbols_new has the following additions:" ;\
711 cat cpp_sig_symbols_diff ;\
712 else echo "No new symbols found."; \
713 fi
714
715 ## Likewise for cpp_err_symbols.in.
716 check_errnos:
717 gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \
718 | cut -f2 -d' ' | sort > cpp_err_symbols_here
719 diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \
720 | egrep '^\+E' \
721 | cut -c2- > cpp_err_symbols_diff
722 if test -s cpp_err_symbols_diff ; then \
723 cat $(srcdir)/cpp_err_symbols.in cpp_err_symbols_diff \
724 | sort > cpp_err_symbols_new ;\
725 echo "cpp_err_symbols_new has the following additions:" ;\
726 cat cpp_err_symbols_diff ;\
727 else echo "No new symbols found."; \
728 fi
729
730 MOSTLYCLEANFILES = \
731 cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \
732 cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new \
733 version.h version.h.tmp \
734 scmconfig.h scmconfig.h.tmp
735
736 CLEANFILES = libpath.h *.x *.doc guile-procedures.txt guile-procedures.texi guile.texi \
737 vm-i-*.i
738
739 MAINTAINERCLEANFILES = c-tokenize.c