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