Modify regexp.test to work better with mac/darwin
[bpt/guile.git] / libguile / Makefile.am
CommitLineData
733943b9 1## Process this file with Automake to create Makefile.in
2764bd99 2##
7ca96180 3## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
2764bd99
JB
4##
5## This file is part of GUILE.
54f16aec 6##
53befeb7
NJ
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
2764bd99 10## (at your option) any later version.
54f16aec 11##
2764bd99
JB
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
53befeb7 15## GNU Lesser General Public License for more details.
54f16aec 16##
53befeb7
NJ
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
733943b9 21
3307df95 22AUTOMAKE_OPTIONS = gnu
733943b9 23
a0599745 24## Prevent automake from adding extra -I options
8f99e3f3 25DEFS = @DEFS@
535b3592
LC
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>.
30DEFAULT_INCLUDES =
31
733943b9
TT
32## Check for headers in $(srcdir)/.., so that #include
33## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
6caac03c 34## building. Also look for Gnulib headers in `lib'.
442f3f20 35AM_CPPFLAGS = -DBUILDING_LIBGUILE=1 -I$(top_srcdir) -I$(top_builddir) \
47871d5a 36 -I$(top_srcdir)/lib -I$(top_builddir)/lib
6caac03c 37
442f3f20 38AM_CFLAGS = $(GCC_CFLAGS) $(CFLAG_VISIBILITY)
6caac03c
LC
39
40## The Gnulib Libtool archive.
41gnulib_library = $(top_builddir)/lib/libgnu.la
733943b9 42
4079f87e 43ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
abc049a9 44 --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
fef07353 45
756e8a3a 46lib_LTLIBRARIES = libguile.la
f94b6524 47bin_PROGRAMS = guile
b32fca0f 48
64c2db80
RB
49noinst_PROGRAMS = guile_filter_doc_snarfage gen-scmconfig
50
51gen_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
55gen-scmconfig.$(OBJEXT): gen-scmconfig.c
56 if [ "$(cross_compiling)" = "yes" ]; then \
47871d5a 57 $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) -c -o $@ $<; \
64c2db80
RB
58 else \
59 $(COMPILE) -c -o $@ $<; \
60 fi
61
2e945bcc
SJ
62## Override default rule; this should run on BUILD host.
63gen-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
71scmconfig.h: ${top_builddir}/config.h gen-scmconfig$(EXEEXT)
64c2db80 72 rm -f scmconfig.h.tmp
eaf94f77 73 cat $(srcdir)/scmconfig.h.top > scmconfig.h.tmp
2e945bcc 74 ./gen-scmconfig$(EXEEXT) >> scmconfig.h.tmp
64c2db80
RB
75 chmod 444 scmconfig.h.tmp
76 rm -f scmconfig.h
77 mv scmconfig.h.tmp scmconfig.h
78
b32fca0f
MV
79guile_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
83c-tokenize.$(OBJEXT): c-tokenize.c
84 if [ "$(cross_compiling)" = "yes" ]; then \
47871d5a 85 $(CC_FOR_BUILD) $(DEFS) $(AM_CPPFLAGS) -c -o $@ $<; \
b32fca0f 86 else \
d3518113 87 $(filter-out -Werror,$(COMPILE)) -c -o $@ $<; \
b32fca0f
MV
88 fi
89
90## Override default rule; this should run on BUILD host.
91guile_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
549436de
JB
99
100guile_SOURCES = guile.c
bfb2e113 101guile_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
8f99e3f3 102guile_LDADD = libguile.la
de7d32d0 103guile_LDFLAGS = $(GUILE_CFLAGS)
5bbc5359 104
bfb2e113 105libguile_la_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
ee2a8b9b 106
a4a0d399
AW
107libguile_la_SOURCES = \
108 alist.c \
109 arbiters.c \
c53c0893 110 array-handle.c \
5d1b3b2d 111 array-map.c \
2fa901a5 112 arrays.c \
a4a0d399
AW
113 async.c \
114 backtrace.c \
115 boolean.c \
cf396142 116 bitvectors.c \
a4a0d399
AW
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 futures.c \
a4a0d399 135 gc-malloc.c \
a4a0d399 136 gc.c \
a4a0d399
AW
137 gdbint.c \
138 gettext.c \
1030b450 139 generalized-arrays.c \
f332e957 140 generalized-vectors.c \
a4a0d399
AW
141 goops.c \
142 gsubr.c \
143 guardians.c \
144 hash.c \
145 hashtab.c \
146 hooks.c \
756e8a3a 147 i18n.c \
a4a0d399
AW
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 \
a4a0d399
AW
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 \
476b894c 197 uniform.c \
a4a0d399
AW
198 values.c \
199 variable.c \
200 vectors.c \
201 version.c \
202 vm.c \
203 vports.c \
204 weaks.c
83495480 205
a4a0d399
AW
206DOT_X_FILES = \
207 alist.x \
208 arbiters.x \
c53c0893 209 array-handle.x \
5d1b3b2d 210 array-map.x \
2fa901a5 211 arrays.x \
a4a0d399
AW
212 async.x \
213 backtrace.x \
214 boolean.x \
cf396142 215 bitvectors.x \
a4a0d399
AW
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 futures.x \
a4a0d399 234 gc-malloc.x \
a4a0d399
AW
235 gc.x \
236 gettext.x \
1030b450 237 generalized-arrays.x \
f332e957 238 generalized-vectors.x \
a4a0d399
AW
239 goops.x \
240 gsubr.x \
241 guardians.x \
242 hash.x \
243 hashtab.x \
244 hooks.x \
245 i18n.x \
246 init.x \
247 ioext.x \
248 keywords.x \
249 lang.x \
250 list.x \
251 load.x \
252 macros.x \
253 mallocs.x \
254 modules.x \
255 numbers.x \
256 objects.x \
257 objprop.x \
258 options.x \
259 pairs.x \
260 ports.x \
261 print.x \
262 procprop.x \
263 procs.x \
264 properties.x \
265 r6rs-ports.x \
a4a0d399
AW
266 random.x \
267 rdelim.x \
268 read.x \
269 root.x \
270 rw.x \
271 scmsigs.x \
272 script.x \
273 simpos.x \
274 smob.x \
275 sort.x \
276 srcprop.x \
277 srfi-13.x \
278 srfi-14.x \
279 srfi-4.x \
280 stackchk.x \
281 stacks.x \
282 stime.x \
283 strings.x \
284 strorder.x \
285 strports.x \
286 struct.x \
287 symbols.x \
288 threads.x \
289 throw.x \
476b894c 290 uniform.x \
a4a0d399
AW
291 values.x \
292 variable.x \
293 vectors.x \
294 version.x \
295 vports.x \
296 weaks.x
8bee78b3 297
83495480
AW
298# vm-related snarfs
299DOT_X_FILES += frames.x instructions.x objcodes.x programs.x vm.x
300
e9e225e5 301EXTRA_DOT_X_FILES = @EXTRA_DOT_X_FILES@
8bee78b3 302
a4a0d399
AW
303DOT_DOC_FILES = \
304 alist.doc \
305 arbiters.doc \
c53c0893 306 array-handle.doc \
5d1b3b2d 307 array-map.doc \
2fa901a5 308 arrays.doc \
a4a0d399
AW
309 async.doc \
310 backtrace.doc \
311 boolean.doc \
cf396142 312 bitvectors.doc \
a4a0d399
AW
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 futures.doc \
a4a0d399 331 gc-malloc.doc \
a4a0d399
AW
332 gc.doc \
333 gettext.doc \
1030b450 334 generalized-arrays.doc \
476b894c 335 generalized-vectors.doc \
a4a0d399
AW
336 goops.doc \
337 gsubr.doc \
338 guardians.doc \
339 hash.doc \
340 hashtab.doc \
341 hooks.doc \
342 i18n.doc \
343 init.doc \
344 ioext.doc \
345 keywords.doc \
346 lang.doc \
347 list.doc \
348 load.doc \
349 macros.doc \
350 mallocs.doc \
351 modules.doc \
352 numbers.doc \
353 objects.doc \
354 objprop.doc \
355 options.doc \
356 pairs.doc \
357 ports.doc \
358 print.doc \
359 procprop.doc \
360 procs.doc \
361 properties.doc \
362 r6rs-ports.doc \
a4a0d399
AW
363 random.doc \
364 rdelim.doc \
365 read.doc \
366 root.doc \
367 rw.doc \
368 scmsigs.doc \
369 script.doc \
370 simpos.doc \
371 smob.doc \
372 sort.doc \
373 srcprop.doc \
374 srfi-13.doc \
375 srfi-14.doc \
376 srfi-4.doc \
377 stackchk.doc \
378 stacks.doc \
379 stime.doc \
380 strings.doc \
381 strorder.doc \
382 strports.doc \
383 struct.doc \
384 symbols.doc \
385 threads.doc \
386 throw.doc \
476b894c 387 uniform.doc \
a4a0d399
AW
388 values.doc \
389 variable.doc \
390 vectors.doc \
391 version.doc \
392 vports.doc \
393 weaks.doc
a3365d47 394
2ce88b54 395EXTRA_DOT_DOC_FILES = @EXTRA_DOT_DOC_FILES@
9515eae6 396
83495480
AW
397DOT_I_FILES = vm-i-system.i vm-i-scheme.i vm-i-loader.i
398
399.c.i:
400 grep '^VM_DEFINE' $< > $@
401
64c2db80
RB
402BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h \
403 version.h scmconfig.h \
83495480 404 $(DOT_I_FILES) $(DOT_X_FILES) $(EXTRA_DOT_X_FILES)
9515eae6 405
f731051e
MV
406EXTRA_libguile_la_SOURCES = _scm.h \
407 inet_aton.c memmove.c putenv.c strerror.c \
408 dynl.c regex-posix.c \
409 filesys.c posix.c net_db.c socket.c \
29627818 410 debug-malloc.c mkstemp.c \
b89c4943
LC
411 win32-uname.c win32-dirent.c win32-socket.c \
412 locale-categories.h
7bfd3b9e 413
413a1367
ML
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.
417install-exec-hook:
b27b814d 418 rm -f $(DESTDIR)$(bindir)/guile-snarf.awk
413a1367 419
7bfd3b9e 420## This is kind of nasty... there are ".c" files that we don't want to
1be6b49c
ML
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.
4b126598 424noinst_HEADERS = conv-integer.i.c conv-uinteger.i.c \
1ee2c72e 425 eval.i.c ieee-754.h \
f49dbcad 426 srfi-4.i.c srfi-14.i.c \
06f9c814 427 quicksort.i.c \
340c49bf 428 win32-uname.h win32-dirent.h win32-socket.h \
03291373 429 private-gc.h private-options.h
7bfd3b9e 430
83495480
AW
431# vm instructions
432noinst_HEADERS += vm-engine.c vm-i-system.c vm-i-scheme.c vm-i-loader.c
433
78bda5f3 434libguile_la_DEPENDENCIES = @LIBLOBJS@
f4863880 435libguile_la_LIBADD = @LIBLOBJS@ $(gnulib_library) $(LTLIBGMP) $(LTLIBUNISTRING)
76e8a758
LC
436libguile_la_LDFLAGS = \
437 @LTLIBINTL@ \
438 -version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ \
439 -export-dynamic -no-undefined \
440 $(GNU_LD_FLAGS)
733943b9 441
9af080f7
LC
442if HAVE_LD_VERSION_SCRIPT
443
444libguile_la_LDFLAGS += -Wl,--version-script="$(srcdir)/libguile.map"
445
446endif HAVE_LD_VERSION_SCRIPT
447
448
54f16aec 449# These are headers visible as <guile/mumble.h>
89bc270d 450pkginclude_HEADERS =
ee2a8b9b 451
733943b9 452# These are headers visible as <libguile/mumble.h>.
5380de6b 453modincludedir = $(includedir)/libguile
a4a0d399
AW
454modinclude_HEADERS = \
455 __scm.h \
456 alist.h \
457 arbiters.h \
c53c0893 458 array-handle.h \
5d1b3b2d 459 array-map.h \
2fa901a5 460 arrays.h \
a4a0d399
AW
461 async.h \
462 backtrace.h \
1c44468d 463 bdw-gc.h \
a4a0d399 464 boolean.h \
cf396142 465 bitvectors.h \
a4a0d399
AW
466 bytevectors.h \
467 chars.h \
468 continuations.h \
469 debug-malloc.h \
470 debug.h \
471 deprecated.h \
472 deprecation.h \
473 discouraged.h \
474 dynl.h \
475 dynwind.h \
476 eq.h \
477 error.h \
478 eval.h \
479 evalext.h \
480 extensions.h \
481 feature.h \
482 filesys.h \
483 fluids.h \
484 fports.h \
485 frames.h \
486 futures.h \
487 gc.h \
488 gdb_interface.h \
489 gdbint.h \
490 gettext.h \
1030b450 491 generalized-arrays.h \
f332e957 492 generalized-vectors.h \
a4a0d399
AW
493 goops.h \
494 gsubr.h \
495 guardians.h \
496 hash.h \
497 hashtab.h \
498 hooks.h \
499 i18n.h \
500 init.h \
501 inline.h \
502 instructions.h \
503 ioext.h \
504 iselect.h \
505 keywords.h \
506 lang.h \
507 list.h \
508 load.h \
509 macros.h \
510 mallocs.h \
511 modules.h \
512 net_db.h \
513 null-threads.h \
514 numbers.h \
515 objcodes.h \
516 objects.h \
517 objprop.h \
518 options.h \
519 pairs.h \
520 ports.h \
521 posix.h \
522 print.h \
523 procprop.h \
524 procs.h \
525 programs.h \
526 properties.h \
527 pthread-threads.h \
528 r6rs-ports.h \
a4a0d399
AW
529 random.h \
530 rdelim.h \
531 read.h \
532 regex-posix.h \
533 root.h \
534 rw.h \
535 scmsigs.h \
536 script.h \
537 simpos.h \
538 smob.h \
539 snarf.h \
540 socket.h \
541 sort.h \
542 srcprop.h \
543 srfi-13.h \
544 srfi-14.h \
545 srfi-4.h \
546 stackchk.h \
547 stacks.h \
548 stime.h \
549 strings.h \
550 strorder.h \
551 strports.h \
552 struct.h \
553 symbols.h \
554 tags.h \
555 threads.h \
556 throw.h \
a4a0d399 557 validate.h \
476b894c 558 uniform.h \
a4a0d399
AW
559 values.h \
560 variable.h \
561 vectors.h \
562 vm-bootstrap.h \
563 vm-engine.h \
564 vm-expand.h \
565 vm.h \
566 vports.h \
567 weaks.h
83495480 568
93ff93f6 569nodist_modinclude_HEADERS = version.h scmconfig.h
733943b9 570
604a672e
TTN
571bin_SCRIPTS = guile-snarf
572
f94b6524
TTN
573# We can re-enable install for some of these if/when they are documented
574# and people feel like maintaining them. For now, this is not the case.
604a672e 575noinst_SCRIPTS = guile-doc-snarf guile-snarf-docs guile-func-name-check
adb75a41 576
89bc270d 577EXTRA_DIST = ChangeLog-scm ChangeLog-threads \
61db429e
LC
578 ChangeLog-1996-1999 ChangeLog-2000 ChangeLog-2008 cpp_signal.c \
579 cpp_errno.c cpp_err_symbols.in cpp_err_symbols.c \
580 cpp_sig_symbols.c cpp_sig_symbols.in cpp_cnvt.awk \
581 c-tokenize.lex version.h.in \
f49dbcad 582 scmconfig.h.top libgettext.h unidata_to_charset.pl libguile.map
c99f9605
ML
583# $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \
584# guile-procedures.txt guile.texi
733943b9 585
d8a20ddb
RB
586## We use @-...-@ as the substitution brackets here, instead of the
587## usual @...@, so autoconf doesn't go and substitute the values
588## directly into the left-hand sides of the sed substitutions. *sigh*
589version.h: version.h.in
8ab3d8a0 590 sed < $(srcdir)/version.h.in > $@.tmp \
d8a20ddb
RB
591 -e s:@-GUILE_MAJOR_VERSION-@:${GUILE_MAJOR_VERSION}: \
592 -e s:@-GUILE_MINOR_VERSION-@:${GUILE_MINOR_VERSION}: \
593 -e s:@-GUILE_MICRO_VERSION-@:${GUILE_MICRO_VERSION}:
594 mv $@.tmp $@
595
fef07353 596## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
90ff3ec5 597libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
54f16aec 598 @echo "Generating libpath.h..."
e151bee6
JB
599 @rm -f libpath.tmp
600 @echo '/* generated by Makefile */' > libpath.tmp
601 @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
d8a20ddb 602 @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)"'>>libpath.tmp
e151bee6 603 @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
eb350124 604 @echo '#define SCM_LIB_DIR "$(pkglibdir)"' >> libpath.tmp
5b197db8
AW
605 @echo '#define SCM_CCACHE_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/ccache"' >> libpath.tmp
606 @echo '#define SCM_EFFECTIVE_VERSION "$(GUILE_EFFECTIVE_VERSION)"' >> libpath.tmp
e151bee6
JB
607 @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp
608 @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp
c565712c 609 @echo ' { "top_srcdir", "@top_srcdir_absolute@" }, \' >> libpath.tmp
e151bee6
JB
610 @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp
611 @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp
612 @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp
613 @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp
614 @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp
615 @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp
616 @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp
617 @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp
618 @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp
619 @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp
5b197db8 620 @echo ' { "ccachedir", SCM_CCACHE_DIR }, \' >> libpath.tmp
e151bee6
JB
621 @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp
622 @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp
623 @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp
eb350124
AW
624 @echo ' { "pkgdatadir", "$(pkgdatadir)" }, \' >> libpath.tmp
625 @echo ' { "pkglibdir", "$(pkglibdir)" }, \' >> libpath.tmp
626 @echo ' { "pkgincludedir", "$(pkgincludedir)" }, \' \
e151bee6 627 >> libpath.tmp
b6fae158 628 @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp
54f16aec
TTN
629 @echo ' { "libguileinterface", "@LIBGUILE_INTERFACE@" }, \' \
630 >> libpath.tmp
30dda257 631 @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp
5bbc5359 632 @echo ' { "CFLAGS", "@GUILE_CFLAGS@" }, \' >> libpath.tmp
54f16aec 633 @echo ' { "buildstamp", "'"`date`"'" }, \' >> libpath.tmp
e151bee6
JB
634 @echo '}' >> libpath.tmp
635 @mv libpath.tmp libpath.h
733943b9 636
3dc81fba 637
47871d5a 638snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
e9c3d3f9 639
3dc81fba 640SUFFIXES = .x .doc
733943b9 641.c.x:
2c7a286a 642 ./guile-snarf -o $@ $< $(snarfcppopts)
c99f9605 643.c.doc:
23d72566 644 -$(AWK) -f ./guile-func-name-check $<
e9c3d3f9 645 (./guile-snarf-docs $(snarfcppopts) $< | \
af68e5e5 646 ./guile_filter_doc_snarfage$(EXEEXT) --filter-snarfage) > $@ || { rm $@; false; }
733943b9 647
23f2b9a3 648$(DOT_X_FILES) $(EXTRA_DOT_X_FILES): scmconfig.h snarf.h guile-snarf.in
c99f9605 649
23f2b9a3 650$(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES): scmconfig.h snarf.h guile-snarf-docs.in guile_filter_doc_snarfage$(EXEEXT)
66418d34 651
faf6a29b
MV
652error.x: cpp_err_symbols.c
653posix.x: cpp_sig_symbols.c
654load.x: libpath.h
655
f8241358 656alldotdocfiles = $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES)
e27f640a 657snarf2checkedtexi = GUILE_AUTO_COMPILE=0 $(top_builddir)/meta/uninstalled-env guile-tools snarf-check-and-output-texi
f8241358
TTN
658dotdoc2texi = cat $(alldotdocfiles) | $(snarf2checkedtexi)
659
2e945bcc 660guile.texi: $(alldotdocfiles) guile$(EXEEXT)
f8241358
TTN
661 $(dotdoc2texi) --manual > $@ || { rm $@; false; }
662
2e945bcc 663guile-procedures.texi: $(alldotdocfiles) guile$(EXEEXT)
f8241358 664 $(dotdoc2texi) > $@ || { rm $@; false; }
9d29e990 665
9df3eecc
MV
666if HAVE_MAKEINFO
667
cecb4a5e 668guile-procedures.txt: guile-procedures.texi
9d29e990 669 rm -f $@
f7742034 670 makeinfo --force -o $@ guile-procedures.texi || test -f $@
4079f87e 671
9df3eecc
MV
672else
673
674guile-procedures.txt: guile-procedures.texi
f7742034 675 cp guile-procedures.texi $@
9df3eecc
MV
676
677endif
678
30e3be5a 679c-tokenize.c: c-tokenize.lex
47ac1e47 680 flex -t $(srcdir)/c-tokenize.lex > $@ || { rm $@; false; }
30e3be5a 681
d8a20ddb 682schemelibdir = $(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)
8dc9439f 683schemelib_DATA = guile-procedures.txt
4079f87e 684
733943b9 685## Add -MG to make the .x magic work with auto-dep code.
47871d5a 686MKDEP = gcc -M -MG $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
ee78fbb0 687
a9c093e2 688cpp_err_symbols.c: cpp_err_symbols.in cpp_cnvt.awk
a0e90145 689 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \
593d151f
JB
690 cpp_err_symbols.tmp
691 mv cpp_err_symbols.tmp cpp_err_symbols.c
ee78fbb0 692
a9c093e2 693cpp_sig_symbols.c: cpp_sig_symbols.in cpp_cnvt.awk
a0e90145 694 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \
593d151f
JB
695 cpp_sig_symbols.tmp
696 mv cpp_sig_symbols.tmp cpp_sig_symbols.c
67ec3667 697
a0e90145 698## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX
67ec3667
GH
699## macros defined on this platform.
700check_signals:
701 gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \
702 | cut -f2 -d' ' | sort > cpp_sig_symbols_here
a0e90145
JB
703 diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \
704 | egrep '^\+S' \
67ec3667
GH
705 | cut -c2- > cpp_sig_symbols_diff
706 if test -s cpp_sig_symbols_diff ; then \
a0e90145 707 cat $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_diff \
67ec3667
GH
708 | sort > cpp_sig_symbols_new ;\
709 echo "cpp_sig_symbols_new has the following additions:" ;\
710 cat cpp_sig_symbols_diff ;\
711 else echo "No new symbols found."; \
712 fi
713
a0e90145 714## Likewise for cpp_err_symbols.in.
67ec3667
GH
715check_errnos:
716 gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \
717 | cut -f2 -d' ' | sort > cpp_err_symbols_here
a0e90145
JB
718 diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \
719 | egrep '^\+E' \
67ec3667
GH
720 | cut -c2- > cpp_err_symbols_diff
721 if test -s cpp_err_symbols_diff ; then \
a0e90145 722 cat $(srcdir)/cpp_err_symbols.in cpp_err_symbols_diff \
67ec3667
GH
723 | sort > cpp_err_symbols_new ;\
724 echo "cpp_err_symbols_new has the following additions:" ;\
725 cat cpp_err_symbols_diff ;\
726 else echo "No new symbols found."; \
727 fi
728
ad6b30a0
TP
729MOSTLYCLEANFILES = \
730 cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \
d8a20ddb
RB
731 cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new \
732 version.h version.h.tmp \
23ccb831 733 scmconfig.h scmconfig.h.tmp
ad6b30a0 734
84595266
AW
735CLEANFILES = libpath.h *.x *.doc guile-procedures.txt guile-procedures.texi guile.texi \
736 vm-i-*.i
ee0c0e03
ML
737
738MAINTAINERCLEANFILES = c-tokenize.c