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