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