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