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