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