print: Fix printing of weak vectors.
[bpt/guile.git] / libguile / Makefile.am
CommitLineData
733943b9 1## Process this file with Automake to create Makefile.in
2764bd99 2##
e4598559 3## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007,
aef1fcf9 4## 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
2764bd99
JB
5##
6## This file is part of GUILE.
54f16aec 7##
53befeb7
NJ
8## GUILE is free software; you can redistribute it and/or modify it
9## under the terms of the GNU Lesser General Public License as
10## published by the Free Software Foundation; either version 3, or
2764bd99 11## (at your option) any later version.
54f16aec 12##
2764bd99
JB
13## GUILE is distributed in the hope that it will be useful, but
14## WITHOUT ANY WARRANTY; without even the implied warranty of
15## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53befeb7 16## GNU Lesser General Public License for more details.
54f16aec 17##
53befeb7
NJ
18## You should have received a copy of the GNU Lesser General Public
19## License along with GUILE; see the file COPYING.LESSER. If not,
20## write to the Free Software Foundation, Inc., 51 Franklin Street,
21## Fifth Floor, Boston, MA 02110-1301 USA
733943b9 22
a572fc95
NI
23include $(top_srcdir)/am/snarf
24
3307df95 25AUTOMAKE_OPTIONS = gnu
733943b9 26
a0599745 27## Prevent automake from adding extra -I options
8f99e3f3 28DEFS = @DEFS@
535b3592
LC
29
30# Override Automake's `DEFAULT_INCLUDES'. By default, it contains
31# "-I$(srcdir)", which causes problems on Tru64 where our "random.h"
32# is picked up by <stdlib.h> instead of the libc's <random.h>.
33DEFAULT_INCLUDES =
34
733943b9
TT
35## Check for headers in $(srcdir)/.., so that #include
36## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
6caac03c 37## building. Also look for Gnulib headers in `lib'.
442f3f20 38AM_CPPFLAGS = -DBUILDING_LIBGUILE=1 -I$(top_srcdir) -I$(top_builddir) \
d8b04f04 39 -I$(top_srcdir)/lib -I$(top_builddir)/lib $(LIBFFI_CFLAGS)
6caac03c 40
d8b04f04 41AM_CFLAGS = $(GCC_CFLAGS) $(CFLAG_VISIBILITY)
6caac03c
LC
42
43## The Gnulib Libtool archive.
44gnulib_library = $(top_builddir)/lib/libgnu.la
733943b9 45
4079f87e 46ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
abc049a9 47 --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
fef07353 48
44602b08 49lib_LTLIBRARIES = libguile-@GUILE_EFFECTIVE_VERSION@.la
f94b6524 50bin_PROGRAMS = guile
b32fca0f 51
64c2db80
RB
52noinst_PROGRAMS = guile_filter_doc_snarfage gen-scmconfig
53
54gen_scmconfig_SOURCES = gen-scmconfig.c
55
a04e5749
AW
56## Override default rule; this should be compiled for BUILD host. Note
57## that we don't add $(AM_CPPFLAGS) here, as we need to run this
58## program, but $(top_srcdir)/lib has a gnulib configured for the
59## target. Instead we manually add $(top_builddir), in order to pick up
60## the generated config.h and gen-scmconfig.h. Nothing else from Guile
61## is included by this code generator.
64c2db80 62gen-scmconfig.$(OBJEXT): gen-scmconfig.c
ad378da9
AW
63 $(AM_V_GEN) \
64 if [ "$(cross_compiling)" = "yes" ]; then \
a04e5749 65 $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) -I$(top_builddir) \
b3da54d1 66 -c -o $@ $<; \
ad378da9
AW
67 else \
68 $(COMPILE) -c -o $@ $<; \
64c2db80
RB
69 fi
70
2e945bcc 71## Override default rule; this should run on BUILD host.
6a6df187 72gen-scmconfig$(EXEEXT): $(gen_scmconfig_OBJECTS) $(gen_scmconfig_DEPENDENCIES)
a572fc95
NI
73 $(AM_V_GEN) \
74 rm -f gen-scmconfig$(EXEEXT); \
2e945bcc
SJ
75 if [ "$(cross_compiling)" = "yes" ]; then \
76 $(CCLD_FOR_BUILD) -o $@ $(gen_scmconfig_OBJECTS); \
77 else \
78 $(LINK) $(gen_scmconfig_OBJECTS) $(LDADD) $(LIBS); \
79 fi
80
81scmconfig.h: ${top_builddir}/config.h gen-scmconfig$(EXEEXT)
a572fc95
NI
82 $(AM_V_GEN)(rm -f scmconfig.h.tmp; \
83 cat $(srcdir)/scmconfig.h.top > scmconfig.h.tmp; \
84 ./gen-scmconfig$(EXEEXT) >> scmconfig.h.tmp; \
85 chmod 444 scmconfig.h.tmp; \
86 rm -f scmconfig.h; \
87 mv scmconfig.h.tmp scmconfig.h)
88
64c2db80 89
b32fca0f
MV
90guile_filter_doc_snarfage_SOURCES = c-tokenize.c
91
92## Override default rule; this should be compiled for BUILD host.
93## For some reason, OBJEXT does not include the dot
94c-tokenize.$(OBJEXT): c-tokenize.c
a572fc95 95 $(AM_V_GEN) \
b32fca0f 96 if [ "$(cross_compiling)" = "yes" ]; then \
94a7029a 97 $(CC_FOR_BUILD) -I$(top_builddir) -c -o $@ $<; \
b32fca0f 98 else \
4ea57d5b 99 $(COMPILE) -c -o $@ $<; \
b32fca0f
MV
100 fi
101
102## Override default rule; this should run on BUILD host.
6a6df187 103guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS) $(guile_filter_doc_snarfage_DEPENDENCIES)
a572fc95
NI
104 $(AM_V_GEN) \
105 rm -f guile_filter_doc_snarfage$(EXEEXT); \
b32fca0f
MV
106 if [ "$(cross_compiling)" = "yes" ]; then \
107 $(CCLD_FOR_BUILD) -o $@ $(guile_filter_doc_snarfage_OBJECTS); \
108 else \
3d458a81 109 $(LINK) $(guile_filter_doc_snarfage_OBJECTS) $(LDADD) $(gnulib_library) $(LIBS); \
b32fca0f
MV
110 fi
111
549436de
JB
112
113guile_SOURCES = guile.c
bfb2e113 114guile_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
44602b08 115guile_LDADD = libguile-@GUILE_EFFECTIVE_VERSION@.la
de7d32d0 116guile_LDFLAGS = $(GUILE_CFLAGS)
5bbc5359 117
44602b08 118libguile_@GUILE_EFFECTIVE_VERSION@_la_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
ee2a8b9b 119
44602b08 120libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = \
a4a0d399
AW
121 alist.c \
122 arbiters.c \
c53c0893 123 array-handle.c \
5d1b3b2d 124 array-map.c \
2fa901a5 125 arrays.c \
a4a0d399
AW
126 async.c \
127 backtrace.c \
128 boolean.c \
cf396142 129 bitvectors.c \
a4a0d399
AW
130 bytevectors.c \
131 chars.c \
b9c100d0 132 control.c \
a4a0d399
AW
133 continuations.c \
134 debug.c \
135 deprecated.c \
136 deprecation.c \
9ede013f 137 dynstack.c \
a4a0d399
AW
138 dynwind.c \
139 eq.c \
140 error.c \
141 eval.c \
142 evalext.c \
dc3e203e 143 expand.c \
a4a0d399
AW
144 extensions.c \
145 feature.c \
073167ef 146 filesys.c \
6e9ec86d 147 finalizers.c \
a4a0d399 148 fluids.c \
e2c2a699 149 foreign.c \
a4a0d399
AW
150 fports.c \
151 frames.c \
a4a0d399 152 gc-malloc.c \
a4a0d399 153 gc.c \
a4a0d399 154 gettext.c \
1030b450 155 generalized-arrays.c \
f332e957 156 generalized-vectors.c \
a4a0d399
AW
157 goops.c \
158 gsubr.c \
159 guardians.c \
160 hash.c \
161 hashtab.c \
162 hooks.c \
756e8a3a 163 i18n.c \
a4a0d399
AW
164 init.c \
165 inline.c \
166 instructions.c \
167 ioext.c \
168 keywords.c \
a4a0d399
AW
169 list.c \
170 load.c \
4cbc95f1 171 loader.c \
a4a0d399
AW
172 macros.c \
173 mallocs.c \
b7742c6b 174 memoize.c \
a4a0d399
AW
175 modules.c \
176 null-threads.c \
177 numbers.c \
a4a0d399
AW
178 objprop.c \
179 options.c \
180 pairs.c \
6f81b18a 181 poll.c \
a4a0d399
AW
182 ports.c \
183 print.c \
184 procprop.c \
185 procs.c \
186 programs.c \
7b893819 187 promises.c \
a4a0d399 188 r6rs-ports.c \
a4a0d399
AW
189 random.c \
190 rdelim.c \
191 read.c \
192 root.c \
193 rw.c \
194 scmsigs.c \
195 script.c \
196 simpos.c \
197 smob.c \
198 sort.c \
199 srcprop.c \
37710f7e
AW
200 srfi-1.c \
201 srfi-4.c \
a4a0d399
AW
202 srfi-13.c \
203 srfi-14.c \
37710f7e 204 srfi-60.c \
a4a0d399
AW
205 stackchk.c \
206 stacks.c \
207 stime.c \
208 strings.c \
209 strorder.c \
210 strports.c \
211 struct.c \
212 symbols.c \
213 threads.c \
214 throw.c \
0f458a37 215 trees.c \
476b894c 216 uniform.c \
a4a0d399
AW
217 values.c \
218 variable.c \
219 vectors.c \
220 version.c \
221 vm.c \
222 vports.c \
26b26354 223 weak-set.c \
7005c60f 224 weak-table.c \
a141db86 225 weak-vector.c
83495480 226
a4a0d399
AW
227DOT_X_FILES = \
228 alist.x \
229 arbiters.x \
c53c0893 230 array-handle.x \
5d1b3b2d 231 array-map.x \
2fa901a5 232 arrays.x \
a4a0d399
AW
233 async.x \
234 backtrace.x \
235 boolean.x \
cf396142 236 bitvectors.x \
a4a0d399
AW
237 bytevectors.x \
238 chars.x \
b9c100d0 239 control.x \
a4a0d399
AW
240 continuations.x \
241 debug.x \
242 deprecated.x \
243 deprecation.x \
a4a0d399
AW
244 dynl.x \
245 dynwind.x \
246 eq.x \
247 error.x \
248 eval.x \
249 evalext.x \
dc3e203e 250 expand.x \
a4a0d399
AW
251 extensions.x \
252 feature.x \
ee037cee 253 filesys.x \
a4a0d399 254 fluids.x \
e2c2a699 255 foreign.x \
a4a0d399 256 fports.x \
4cbc95f1 257 frames.x \
a4a0d399 258 gc-malloc.x \
a4a0d399
AW
259 gc.x \
260 gettext.x \
1030b450 261 generalized-arrays.x \
f332e957 262 generalized-vectors.x \
a4a0d399
AW
263 goops.x \
264 gsubr.x \
265 guardians.x \
266 hash.x \
267 hashtab.x \
268 hooks.x \
269 i18n.x \
270 init.x \
4cbc95f1 271 instructions.x \
a4a0d399
AW
272 ioext.x \
273 keywords.x \
a4a0d399
AW
274 list.x \
275 load.x \
4cbc95f1 276 loader.x \
a4a0d399
AW
277 macros.x \
278 mallocs.x \
b7742c6b 279 memoize.x \
a4a0d399
AW
280 modules.x \
281 numbers.x \
a4a0d399
AW
282 objprop.x \
283 options.x \
284 pairs.x \
285 ports.x \
286 print.x \
287 procprop.x \
288 procs.x \
4cbc95f1 289 programs.x \
7b893819 290 promises.x \
a4a0d399 291 r6rs-ports.x \
a4a0d399
AW
292 random.x \
293 rdelim.x \
294 read.x \
295 root.x \
296 rw.x \
297 scmsigs.x \
298 script.x \
299 simpos.x \
300 smob.x \
301 sort.x \
302 srcprop.x \
37710f7e
AW
303 srfi-1.x \
304 srfi-4.x \
a4a0d399
AW
305 srfi-13.x \
306 srfi-14.x \
37710f7e 307 srfi-60.x \
a4a0d399
AW
308 stackchk.x \
309 stacks.x \
310 stime.x \
311 strings.x \
312 strorder.x \
313 strports.x \
314 struct.x \
315 symbols.x \
316 threads.x \
317 throw.x \
0f458a37 318 trees.x \
476b894c 319 uniform.x \
a4a0d399
AW
320 values.x \
321 variable.x \
322 vectors.x \
323 version.x \
4cbc95f1 324 vm.x \
a4a0d399 325 vports.x \
26b26354 326 weak-set.x \
7005c60f 327 weak-table.x \
a141db86 328 weak-vector.x
8bee78b3 329
e9e225e5 330EXTRA_DOT_X_FILES = @EXTRA_DOT_X_FILES@
8bee78b3 331
a4a0d399
AW
332DOT_DOC_FILES = \
333 alist.doc \
334 arbiters.doc \
c53c0893 335 array-handle.doc \
5d1b3b2d 336 array-map.doc \
2fa901a5 337 arrays.doc \
a4a0d399
AW
338 async.doc \
339 backtrace.doc \
340 boolean.doc \
cf396142 341 bitvectors.doc \
a4a0d399
AW
342 bytevectors.doc \
343 chars.doc \
b9c100d0 344 control.doc \
a4a0d399
AW
345 continuations.doc \
346 debug.doc \
347 deprecated.doc \
348 deprecation.doc \
a4a0d399
AW
349 dynl.doc \
350 dynwind.doc \
351 eq.doc \
352 error.doc \
353 eval.doc \
354 evalext.doc \
dc3e203e 355 expand.doc \
a4a0d399
AW
356 extensions.doc \
357 feature.doc \
073167ef 358 filesys.doc \
a4a0d399 359 fluids.doc \
e2c2a699 360 foreign.doc \
a4a0d399 361 fports.doc \
a4a0d399 362 gc-malloc.doc \
a4a0d399
AW
363 gc.doc \
364 gettext.doc \
1030b450 365 generalized-arrays.doc \
476b894c 366 generalized-vectors.doc \
a4a0d399
AW
367 goops.doc \
368 gsubr.doc \
369 guardians.doc \
370 hash.doc \
371 hashtab.doc \
372 hooks.doc \
373 i18n.doc \
374 init.doc \
375 ioext.doc \
376 keywords.doc \
a4a0d399
AW
377 list.doc \
378 load.doc \
379 macros.doc \
380 mallocs.doc \
b7742c6b 381 memoize.doc \
a4a0d399
AW
382 modules.doc \
383 numbers.doc \
a4a0d399
AW
384 objprop.doc \
385 options.doc \
386 pairs.doc \
387 ports.doc \
388 print.doc \
389 procprop.doc \
390 procs.doc \
7b893819 391 promises.doc \
a4a0d399 392 r6rs-ports.doc \
a4a0d399
AW
393 random.doc \
394 rdelim.doc \
395 read.doc \
396 root.doc \
397 rw.doc \
398 scmsigs.doc \
399 script.doc \
400 simpos.doc \
401 smob.doc \
402 sort.doc \
403 srcprop.doc \
37710f7e
AW
404 srfi-1.doc \
405 srfi-4.doc \
a4a0d399
AW
406 srfi-13.doc \
407 srfi-14.doc \
37710f7e 408 srfi-60.doc \
a4a0d399
AW
409 stackchk.doc \
410 stacks.doc \
411 stime.doc \
412 strings.doc \
413 strorder.doc \
414 strports.doc \
415 struct.doc \
416 symbols.doc \
417 threads.doc \
418 throw.doc \
0f458a37 419 trees.doc \
476b894c 420 uniform.doc \
a4a0d399
AW
421 values.doc \
422 variable.doc \
423 vectors.doc \
424 version.doc \
425 vports.doc \
26b26354 426 weak-set.doc \
7005c60f 427 weak-table.doc \
a141db86 428 weak-vector.doc
a3365d47 429
2ce88b54 430EXTRA_DOT_DOC_FILES = @EXTRA_DOT_DOC_FILES@
9515eae6 431
510ca126
AW
432vm-operations.h: vm-engine.c
433 @echo '/* This file was generated automatically from $<; do not' > $@
434 @echo ' edit. See the source file for copyright information. */' >> $@
435 @echo '' >> $@
436 @echo "#define FOR_EACH_VM_OPERATION(M) \\" >> $@
437 $(AM_V_GEN)$(GREP) '^ *VM_DEFINE_OP' $< \
438 | sed -e 's,VM_DEFINE_OP (\(.*\)).*, M (\1) \\,' >> $@
439 @echo '' >> $@
440
648da032 441BUILT_SOURCES = cpp-E.c cpp-SIG.c libpath.h \
b405cdb4 442 scmconfig.h \
510ca126 443 $(DOT_I_FILES) vm-operations.h $(DOT_X_FILES) $(EXTRA_DOT_X_FILES)
9515eae6 444
c5c7c114
LC
445# Force the generation of `guile-procedures.texi' because the top-level
446# Makefile expects it to be built.
447all-local: guile-procedures.texi
448
44602b08 449EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = _scm.h \
c32b39b9 450 memmove.c strerror.c \
f731051e 451 dynl.c regex-posix.c \
073167ef 452 posix.c net_db.c socket.c \
29627818 453 debug-malloc.c mkstemp.c \
09b204d3 454 win32-uname.c \
b89c4943 455 locale-categories.h
7bfd3b9e 456
413a1367
ML
457## delete guile-snarf.awk from the installation bindir, in case it's
458## lingering there due to an earlier guile version not having been
459## wiped out.
460install-exec-hook:
b27b814d 461 rm -f $(DESTDIR)$(bindir)/guile-snarf.awk
413a1367 462
7bfd3b9e 463## This is kind of nasty... there are ".c" files that we don't want to
1be6b49c
ML
464## compile, since they are #included. So instead we list them here.
465## Perhaps we can deal with them normally once the merge seems to be
466## working.
4b126598 467noinst_HEADERS = conv-integer.i.c conv-uinteger.i.c \
afc74c29 468 elf.h \
71560395 469 srfi-14.i.c \
06f9c814 470 quicksort.i.c \
09b204d3 471 win32-uname.h \
87fc4596 472 private-options.h ports-internal.h
7bfd3b9e 473
83495480 474# vm instructions
1c33be99 475noinst_HEADERS += vm-engine.c
83495480 476
44602b08 477libguile_@GUILE_EFFECTIVE_VERSION@_la_DEPENDENCIES = @LIBLOBJS@
abd7e37a 478
18f2d5aa 479libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD = \
cae0945c
LC
480 @LIBLOBJS@ $(gnulib_library) $(LTLIBGMP) $(LTLIBLTDL)
481
482# Libtool version info.
483version_info = @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@
484
485libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS = \
486 $(BDW_GC_LIBS) $(LIBFFI_LIBS) \
dd36ce77 487 $(CEIL_LIBM) \
cae0945c 488 $(FLOOR_LIBM) \
dd36ce77 489 $(FREXP_LIBM) \
cae0945c
LC
490 $(GETADDRINFO_LIB) \
491 $(HOSTENT_LIB) \
492 $(INET_NTOP_LIB) \
493 $(INET_PTON_LIB) \
494 $(ISNAND_LIBM) \
495 $(ISNANF_LIBM) \
496 $(ISNANL_LIBM) \
dd36ce77 497 $(LDEXP_LIBM) \
cae0945c 498 $(LIBSOCKET) \
235c2804 499 $(LIB_CLOCK_GETTIME) \
cae0945c 500 $(LOG1P_LIBM) \
005de2e8 501 $(LOG_LIBM) \
cae0945c
LC
502 $(LTLIBICONV) \
503 $(LTLIBINTL) \
504 $(LTLIBUNISTRING) \
005de2e8 505 $(ROUND_LIBM) \
cae0945c
LC
506 $(SERVENT_LIB) \
507 $(TRUNC_LIBM) \
508 -version-info $(version_info) \
509 -export-dynamic -no-undefined \
76e8a758 510 $(GNU_LD_FLAGS)
733943b9 511
9af080f7
LC
512if HAVE_LD_VERSION_SCRIPT
513
44602b08 514libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS += -Wl,--version-script="$(srcdir)/libguile.map"
9af080f7
LC
515
516endif HAVE_LD_VERSION_SCRIPT
517
518
54f16aec 519# These are headers visible as <guile/mumble.h>
6a6df187 520pkginclude_HEADERS =
ee2a8b9b 521
733943b9 522# These are headers visible as <libguile/mumble.h>.
718815d7 523modincludedir = $(pkgincludedir)/$(GUILE_EFFECTIVE_VERSION)/libguile
a4a0d399
AW
524modinclude_HEADERS = \
525 __scm.h \
526 alist.h \
527 arbiters.h \
c53c0893 528 array-handle.h \
5d1b3b2d 529 array-map.h \
2fa901a5 530 arrays.h \
a4a0d399
AW
531 async.h \
532 backtrace.h \
1c44468d 533 bdw-gc.h \
a4a0d399 534 boolean.h \
cf396142 535 bitvectors.h \
a4a0d399
AW
536 bytevectors.h \
537 chars.h \
b9c100d0 538 control.h \
a4a0d399
AW
539 continuations.h \
540 debug-malloc.h \
541 debug.h \
542 deprecated.h \
543 deprecation.h \
a4a0d399 544 dynl.h \
9ede013f 545 dynstack.h \
a4a0d399
AW
546 dynwind.h \
547 eq.h \
548 error.h \
549 eval.h \
550 evalext.h \
dc3e203e 551 expand.h \
a4a0d399
AW
552 extensions.h \
553 feature.h \
6e9ec86d 554 finalizers.h \
a4a0d399
AW
555 filesys.h \
556 fluids.h \
e2c2a699 557 foreign.h \
a4a0d399
AW
558 fports.h \
559 frames.h \
a4a0d399 560 gc.h \
aef1fcf9 561 gc-inline.h \
a4a0d399 562 gettext.h \
1030b450 563 generalized-arrays.h \
f332e957 564 generalized-vectors.h \
a4a0d399
AW
565 goops.h \
566 gsubr.h \
567 guardians.h \
568 hash.h \
569 hashtab.h \
570 hooks.h \
571 i18n.h \
572 init.h \
573 inline.h \
574 instructions.h \
575 ioext.h \
576 iselect.h \
577 keywords.h \
a4a0d399
AW
578 list.h \
579 load.h \
4cbc95f1 580 loader.h \
a4a0d399
AW
581 macros.h \
582 mallocs.h \
b7742c6b 583 memoize.h \
a4a0d399
AW
584 modules.h \
585 net_db.h \
586 null-threads.h \
587 numbers.h \
a4a0d399
AW
588 objprop.h \
589 options.h \
590 pairs.h \
6f81b18a 591 poll.h \
a4a0d399
AW
592 ports.h \
593 posix.h \
594 print.h \
595 procprop.h \
596 procs.h \
597 programs.h \
7b893819 598 promises.h \
a4a0d399
AW
599 pthread-threads.h \
600 r6rs-ports.h \
a4a0d399
AW
601 random.h \
602 rdelim.h \
603 read.h \
604 regex-posix.h \
605 root.h \
606 rw.h \
607 scmsigs.h \
608 script.h \
609 simpos.h \
610 smob.h \
611 snarf.h \
612 socket.h \
613 sort.h \
614 srcprop.h \
37710f7e
AW
615 srfi-1.h \
616 srfi-4.h \
a4a0d399
AW
617 srfi-13.h \
618 srfi-14.h \
37710f7e 619 srfi-60.h \
a4a0d399
AW
620 stackchk.h \
621 stacks.h \
622 stime.h \
623 strings.h \
624 strorder.h \
625 strports.h \
626 struct.h \
627 symbols.h \
628 tags.h \
629 threads.h \
630 throw.h \
0f458a37 631 trees.h \
a4a0d399 632 validate.h \
476b894c 633 uniform.h \
a4a0d399
AW
634 values.h \
635 variable.h \
636 vectors.h \
486013d6 637 vm-builtins.h \
a4a0d399
AW
638 vm-expand.h \
639 vm.h \
640 vports.h \
26b26354 641 weak-set.h \
7005c60f 642 weak-table.h \
a141db86 643 weak-vector.h
83495480 644
93ff93f6 645nodist_modinclude_HEADERS = version.h scmconfig.h
733943b9 646
604a672e
TTN
647bin_SCRIPTS = guile-snarf
648
f94b6524
TTN
649# We can re-enable install for some of these if/when they are documented
650# and people feel like maintaining them. For now, this is not the case.
2d6a14ad 651noinst_SCRIPTS = guile-snarf-docs
adb75a41 652
89bc270d 653EXTRA_DIST = ChangeLog-scm ChangeLog-threads \
648da032 654 ChangeLog-1996-1999 ChangeLog-2000 ChangeLog-2008 \
2d6a14ad 655 guile-func-name-check \
648da032 656 cpp-E.syms cpp-E.c cpp-SIG.syms cpp-SIG.c \
b405cdb4 657 c-tokenize.lex \
f49dbcad 658 scmconfig.h.top libgettext.h unidata_to_charset.pl libguile.map
c99f9605
ML
659# $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \
660# guile-procedures.txt guile.texi
733943b9 661
fef07353 662## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
90ff3ec5 663libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
e151bee6
JB
664 @rm -f libpath.tmp
665 @echo '/* generated by Makefile */' > libpath.tmp
666 @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
d8a20ddb 667 @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)"'>>libpath.tmp
d5a1a8cd 668 @echo '#define SCM_SITE_DIR "$(sitedir)"' >> libpath.tmp
bc325e76 669 @echo '#define SCM_GLOBAL_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
28af5ee5
AW
670 @echo '#define SCM_LIB_DIR "$(libdir)"' >> libpath.tmp
671 @echo '#define SCM_EXTENSIONS_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/extensions"' >> libpath.tmp
5b197db8 672 @echo '#define SCM_CCACHE_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/ccache"' >> libpath.tmp
9957641b 673 @echo '#define SCM_SITE_CCACHE_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache"' >> libpath.tmp
5b197db8 674 @echo '#define SCM_EFFECTIVE_VERSION "$(GUILE_EFFECTIVE_VERSION)"' >> libpath.tmp
e151bee6
JB
675 @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp
676 @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp
c565712c 677 @echo ' { "top_srcdir", "@top_srcdir_absolute@" }, \' >> libpath.tmp
e151bee6
JB
678 @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp
679 @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp
680 @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp
681 @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp
682 @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp
683 @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp
684 @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp
685 @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp
686 @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp
687 @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp
5b197db8 688 @echo ' { "ccachedir", SCM_CCACHE_DIR }, \' >> libpath.tmp
e151bee6
JB
689 @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp
690 @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp
691 @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp
eb350124
AW
692 @echo ' { "pkgdatadir", "$(pkgdatadir)" }, \' >> libpath.tmp
693 @echo ' { "pkglibdir", "$(pkglibdir)" }, \' >> libpath.tmp
694 @echo ' { "pkgincludedir", "$(pkgincludedir)" }, \' \
e151bee6 695 >> libpath.tmp
869bfe86 696 @echo ' { "extensiondir", "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/extensions" }, \' >> libpath.tmp
b6fae158 697 @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp
54f16aec
TTN
698 @echo ' { "libguileinterface", "@LIBGUILE_INTERFACE@" }, \' \
699 >> libpath.tmp
30dda257 700 @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp
5bbc5359 701 @echo ' { "CFLAGS", "@GUILE_CFLAGS@" }, \' >> libpath.tmp
a6025413 702 @echo ' { "buildstamp", "'`date -u +'%Y-%m-%d %T'`'" }, \' >> libpath.tmp
e151bee6 703 @echo '}' >> libpath.tmp
a572fc95 704 $(AM_V_GEN)mv libpath.tmp libpath.h
733943b9 705
3dc81fba 706
47871d5a 707snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
e9c3d3f9 708
3dc81fba 709SUFFIXES = .x .doc
a572fc95 710
733943b9 711.c.x:
a572fc95 712 $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
c99f9605 713.c.doc:
e6d67f1e 714 $(AM_V_SNARF)./guile-snarf-docs -o $@ $< -- $(snarfcppopts)
733943b9 715
f9560a34 716$(DOT_X_FILES) $(EXTRA_DOT_X_FILES): scmconfig.h snarf.h guile-snarf.in version.h
c99f9605 717
23f2b9a3 718$(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES): scmconfig.h snarf.h guile-snarf-docs.in guile_filter_doc_snarfage$(EXEEXT)
66418d34 719
648da032
TTN
720error.x: cpp-E.c
721posix.x: cpp-SIG.c
faf6a29b 722load.x: libpath.h
0bc37aec 723dynl.x: libpath.h
faf6a29b 724
f8241358 725alldotdocfiles = $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES)
b8b06598 726snarf2checkedtexi = GUILE_AUTO_COMPILE=0 $(top_builddir)/meta/uninstalled-env guild snarf-check-and-output-texi
f8241358
TTN
727dotdoc2texi = cat $(alldotdocfiles) | $(snarf2checkedtexi)
728
2e945bcc 729guile.texi: $(alldotdocfiles) guile$(EXEEXT)
f8241358
TTN
730 $(dotdoc2texi) --manual > $@ || { rm $@; false; }
731
2e945bcc 732guile-procedures.texi: $(alldotdocfiles) guile$(EXEEXT)
a572fc95 733 $(AM_V_GEN)$(dotdoc2texi) > $@ || { rm $@; false; }
9d29e990 734
30e3be5a 735c-tokenize.c: c-tokenize.lex
47ac1e47 736 flex -t $(srcdir)/c-tokenize.lex > $@ || { rm $@; false; }
30e3be5a 737
733943b9 738## Add -MG to make the .x magic work with auto-dep code.
47871d5a 739MKDEP = gcc -M -MG $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
ee78fbb0 740
648da032
TTN
741\f
742# This page is for maintenance of the lists of CPP symbols that are eventually
743# included in error.c (‘errno’ values: E*) and posix.c (signal names: SIG*),
744# in the funcs scm_init_{error,posix}, respectively.
745#
746# The lists (files cpp-{E,SIG}.syms) are not included verbatim, but processed
747# (via pattern rule ‘.syms.c’ below) so that each CPP symbol is transformed to
748# fragment of #ifdef'd C code that defines a Scheme variable of the same name.
749# The resulting files, cpp-{E,SIG}.c, are the ones #include:d.
750#
751# To maintain the (source) lists of symbols, we use a GCC-specific feature
752# to list all symbols #define:d when expanding <{errno,signal}.h>, grep
753# the output for {E,SIG}*, massage the result into a usable form, and
754# construct a union of the current and new symbols. This is written to
755# files cpp-{E,SIG}.syms.NEW for review. If things look ok, you can then
756# "mv foo.NEW foo" and commit. Generating the foo.NEW files and showing
757# an informative message is the job of targets chknew-{E,SIG}.
758
759# For each line in foo.syms, transform:
760# SYMBOL
761# to:
762# #ifdef SYMBOL
763# scm_c_define ("SYMBOL", scm_from_int (SYMBOL));
764# #endif
319b53dd
TTN
765# writing output to foo.c. We use a while-read loop instead of a
766# one-line sed script because some seds (e.g., FreeBSD) don't read
767# '\n' as a newline (like GNU sed does). Sad, but true.
648da032 768.syms.c:
bfebf099 769 $(AM_V_GEN) \
319b53dd
TTN
770 cat $< | while read sym ; do \
771 echo "#ifdef $$sym" ; \
772 echo "scm_c_define (\"$$sym\", scm_from_int ($$sym));" ; \
773 echo "#endif" ; \
774 done > $@T
bfebf099 775 @mv $@T $@
648da032
TTN
776
777# Write $(srcdir)/cpp-{E,SIG}.syms.NEW if there are any not-yet-seen
778# ("new" to us) E* or SIG* symbols in <errno.h> or <signal.h>, respectively.
9253d090 779chknew-E chknew-SIG: \
648da032
TTN
780 @bit=`echo $@ | sed s/^chknew-//` ; \
781 old="$(srcdir)/cpp-$$bit.syms" ; \
782 echo "#include <$${bit}.h>" \
783 | sed 's/E/errno/;s/SIG/signal/' \
9253d090 784 | gcc -dM -E - \
648da032
TTN
785 | sed 's/^#define //;/^'$$bit'[A-Z][A-Z]*/!d;s/ .*//' \
786 | sort | diff -u $$old - | sed '1,2d;/^+/!d;s/^.//' \
787 > TMP ; \
788 if [ -s TMP ] ; then new="$$old.NEW" ; \
789 cat $$old TMP | sort > $$new ; \
790 echo "$$new: `sed -n '$$=' TMP` new symbol(s)." ; \
791 sed 's/^/ /' TMP ; \
792 else echo "No new symbols found." ; \
793 fi ; rm TMP
794
795\f
67ec3667 796
ad6b30a0 797MOSTLYCLEANFILES = \
23ccb831 798 scmconfig.h scmconfig.h.tmp
ad6b30a0 799
1c33be99 800CLEANFILES = libpath.h *.x *.doc guile-procedures.txt guile-procedures.texi guile.texi
ee0c0e03
ML
801
802MAINTAINERCLEANFILES = c-tokenize.c