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