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