scm_i_tag_name internal to gc.c
[bpt/guile.git] / libguile / Makefile.am
CommitLineData
733943b9 1## Process this file with Automake to create Makefile.in
2764bd99 2##
e4598559
MW
3## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007,
4## 2008, 2009, 2010, 2011, 2012, 2013 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 \
e4598559 472 private-gc.h 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 \
a4a0d399 561 gettext.h \
1030b450 562 generalized-arrays.h \
f332e957 563 generalized-vectors.h \
a4a0d399
AW
564 goops.h \
565 gsubr.h \
566 guardians.h \
567 hash.h \
568 hashtab.h \
569 hooks.h \
570 i18n.h \
571 init.h \
572 inline.h \
573 instructions.h \
574 ioext.h \
575 iselect.h \
576 keywords.h \
a4a0d399
AW
577 list.h \
578 load.h \
4cbc95f1 579 loader.h \
a4a0d399
AW
580 macros.h \
581 mallocs.h \
b7742c6b 582 memoize.h \
a4a0d399
AW
583 modules.h \
584 net_db.h \
585 null-threads.h \
586 numbers.h \
a4a0d399
AW
587 objprop.h \
588 options.h \
589 pairs.h \
6f81b18a 590 poll.h \
a4a0d399
AW
591 ports.h \
592 posix.h \
593 print.h \
594 procprop.h \
595 procs.h \
596 programs.h \
7b893819 597 promises.h \
a4a0d399
AW
598 pthread-threads.h \
599 r6rs-ports.h \
a4a0d399
AW
600 random.h \
601 rdelim.h \
602 read.h \
603 regex-posix.h \
604 root.h \
605 rw.h \
606 scmsigs.h \
607 script.h \
608 simpos.h \
609 smob.h \
610 snarf.h \
611 socket.h \
612 sort.h \
613 srcprop.h \
37710f7e
AW
614 srfi-1.h \
615 srfi-4.h \
a4a0d399
AW
616 srfi-13.h \
617 srfi-14.h \
37710f7e 618 srfi-60.h \
a4a0d399
AW
619 stackchk.h \
620 stacks.h \
621 stime.h \
622 strings.h \
623 strorder.h \
624 strports.h \
625 struct.h \
626 symbols.h \
627 tags.h \
628 threads.h \
629 throw.h \
0f458a37 630 trees.h \
a4a0d399 631 validate.h \
476b894c 632 uniform.h \
a4a0d399
AW
633 values.h \
634 variable.h \
635 vectors.h \
486013d6 636 vm-builtins.h \
a4a0d399
AW
637 vm-expand.h \
638 vm.h \
639 vports.h \
26b26354 640 weak-set.h \
7005c60f 641 weak-table.h \
a141db86 642 weak-vector.h
83495480 643
93ff93f6 644nodist_modinclude_HEADERS = version.h scmconfig.h
733943b9 645
604a672e
TTN
646bin_SCRIPTS = guile-snarf
647
f94b6524
TTN
648# We can re-enable install for some of these if/when they are documented
649# and people feel like maintaining them. For now, this is not the case.
2d6a14ad 650noinst_SCRIPTS = guile-snarf-docs
adb75a41 651
89bc270d 652EXTRA_DIST = ChangeLog-scm ChangeLog-threads \
648da032 653 ChangeLog-1996-1999 ChangeLog-2000 ChangeLog-2008 \
2d6a14ad 654 guile-func-name-check \
648da032 655 cpp-E.syms cpp-E.c cpp-SIG.syms cpp-SIG.c \
b405cdb4 656 c-tokenize.lex \
f49dbcad 657 scmconfig.h.top libgettext.h unidata_to_charset.pl libguile.map
c99f9605
ML
658# $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \
659# guile-procedures.txt guile.texi
733943b9 660
fef07353 661## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
90ff3ec5 662libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
e151bee6
JB
663 @rm -f libpath.tmp
664 @echo '/* generated by Makefile */' > libpath.tmp
665 @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
d8a20ddb 666 @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)"'>>libpath.tmp
d5a1a8cd 667 @echo '#define SCM_SITE_DIR "$(sitedir)"' >> libpath.tmp
bc325e76 668 @echo '#define SCM_GLOBAL_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
28af5ee5
AW
669 @echo '#define SCM_LIB_DIR "$(libdir)"' >> libpath.tmp
670 @echo '#define SCM_EXTENSIONS_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/extensions"' >> libpath.tmp
5b197db8 671 @echo '#define SCM_CCACHE_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/ccache"' >> libpath.tmp
9957641b 672 @echo '#define SCM_SITE_CCACHE_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache"' >> libpath.tmp
5b197db8 673 @echo '#define SCM_EFFECTIVE_VERSION "$(GUILE_EFFECTIVE_VERSION)"' >> libpath.tmp
e151bee6
JB
674 @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp
675 @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp
c565712c 676 @echo ' { "top_srcdir", "@top_srcdir_absolute@" }, \' >> libpath.tmp
e151bee6
JB
677 @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp
678 @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp
679 @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp
680 @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp
681 @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp
682 @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp
683 @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp
684 @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp
685 @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp
686 @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp
5b197db8 687 @echo ' { "ccachedir", SCM_CCACHE_DIR }, \' >> libpath.tmp
e151bee6
JB
688 @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp
689 @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp
690 @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp
eb350124
AW
691 @echo ' { "pkgdatadir", "$(pkgdatadir)" }, \' >> libpath.tmp
692 @echo ' { "pkglibdir", "$(pkglibdir)" }, \' >> libpath.tmp
693 @echo ' { "pkgincludedir", "$(pkgincludedir)" }, \' \
e151bee6 694 >> libpath.tmp
869bfe86 695 @echo ' { "extensiondir", "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/extensions" }, \' >> libpath.tmp
b6fae158 696 @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp
54f16aec
TTN
697 @echo ' { "libguileinterface", "@LIBGUILE_INTERFACE@" }, \' \
698 >> libpath.tmp
30dda257 699 @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp
5bbc5359 700 @echo ' { "CFLAGS", "@GUILE_CFLAGS@" }, \' >> libpath.tmp
a6025413 701 @echo ' { "buildstamp", "'`date -u +'%Y-%m-%d %T'`'" }, \' >> libpath.tmp
e151bee6 702 @echo '}' >> libpath.tmp
a572fc95 703 $(AM_V_GEN)mv libpath.tmp libpath.h
733943b9 704
3dc81fba 705
47871d5a 706snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
e9c3d3f9 707
3dc81fba 708SUFFIXES = .x .doc
a572fc95 709
733943b9 710.c.x:
a572fc95 711 $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
c99f9605 712.c.doc:
e6d67f1e 713 $(AM_V_SNARF)./guile-snarf-docs -o $@ $< -- $(snarfcppopts)
733943b9 714
f9560a34 715$(DOT_X_FILES) $(EXTRA_DOT_X_FILES): scmconfig.h snarf.h guile-snarf.in version.h
c99f9605 716
23f2b9a3 717$(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES): scmconfig.h snarf.h guile-snarf-docs.in guile_filter_doc_snarfage$(EXEEXT)
66418d34 718
648da032
TTN
719error.x: cpp-E.c
720posix.x: cpp-SIG.c
faf6a29b 721load.x: libpath.h
0bc37aec 722dynl.x: libpath.h
faf6a29b 723
f8241358 724alldotdocfiles = $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES)
b8b06598 725snarf2checkedtexi = GUILE_AUTO_COMPILE=0 $(top_builddir)/meta/uninstalled-env guild snarf-check-and-output-texi
f8241358
TTN
726dotdoc2texi = cat $(alldotdocfiles) | $(snarf2checkedtexi)
727
2e945bcc 728guile.texi: $(alldotdocfiles) guile$(EXEEXT)
f8241358
TTN
729 $(dotdoc2texi) --manual > $@ || { rm $@; false; }
730
2e945bcc 731guile-procedures.texi: $(alldotdocfiles) guile$(EXEEXT)
a572fc95 732 $(AM_V_GEN)$(dotdoc2texi) > $@ || { rm $@; false; }
9d29e990 733
30e3be5a 734c-tokenize.c: c-tokenize.lex
47ac1e47 735 flex -t $(srcdir)/c-tokenize.lex > $@ || { rm $@; false; }
30e3be5a 736
733943b9 737## Add -MG to make the .x magic work with auto-dep code.
47871d5a 738MKDEP = gcc -M -MG $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
ee78fbb0 739
648da032
TTN
740\f
741# This page is for maintenance of the lists of CPP symbols that are eventually
742# included in error.c (‘errno’ values: E*) and posix.c (signal names: SIG*),
743# in the funcs scm_init_{error,posix}, respectively.
744#
745# The lists (files cpp-{E,SIG}.syms) are not included verbatim, but processed
746# (via pattern rule ‘.syms.c’ below) so that each CPP symbol is transformed to
747# fragment of #ifdef'd C code that defines a Scheme variable of the same name.
748# The resulting files, cpp-{E,SIG}.c, are the ones #include:d.
749#
750# To maintain the (source) lists of symbols, we use a GCC-specific feature
751# to list all symbols #define:d when expanding <{errno,signal}.h>, grep
752# the output for {E,SIG}*, massage the result into a usable form, and
753# construct a union of the current and new symbols. This is written to
754# files cpp-{E,SIG}.syms.NEW for review. If things look ok, you can then
755# "mv foo.NEW foo" and commit. Generating the foo.NEW files and showing
756# an informative message is the job of targets chknew-{E,SIG}.
757
758# For each line in foo.syms, transform:
759# SYMBOL
760# to:
761# #ifdef SYMBOL
762# scm_c_define ("SYMBOL", scm_from_int (SYMBOL));
763# #endif
319b53dd
TTN
764# writing output to foo.c. We use a while-read loop instead of a
765# one-line sed script because some seds (e.g., FreeBSD) don't read
766# '\n' as a newline (like GNU sed does). Sad, but true.
648da032 767.syms.c:
bfebf099 768 $(AM_V_GEN) \
319b53dd
TTN
769 cat $< | while read sym ; do \
770 echo "#ifdef $$sym" ; \
771 echo "scm_c_define (\"$$sym\", scm_from_int ($$sym));" ; \
772 echo "#endif" ; \
773 done > $@T
bfebf099 774 @mv $@T $@
648da032
TTN
775
776# Write $(srcdir)/cpp-{E,SIG}.syms.NEW if there are any not-yet-seen
777# ("new" to us) E* or SIG* symbols in <errno.h> or <signal.h>, respectively.
9253d090 778chknew-E chknew-SIG: \
648da032
TTN
779 @bit=`echo $@ | sed s/^chknew-//` ; \
780 old="$(srcdir)/cpp-$$bit.syms" ; \
781 echo "#include <$${bit}.h>" \
782 | sed 's/E/errno/;s/SIG/signal/' \
9253d090 783 | gcc -dM -E - \
648da032
TTN
784 | sed 's/^#define //;/^'$$bit'[A-Z][A-Z]*/!d;s/ .*//' \
785 | sort | diff -u $$old - | sed '1,2d;/^+/!d;s/^.//' \
786 > TMP ; \
787 if [ -s TMP ] ; then new="$$old.NEW" ; \
788 cat $$old TMP | sort > $$new ; \
789 echo "$$new: `sed -n '$$=' TMP` new symbol(s)." ; \
790 sed 's/^/ /' TMP ; \
791 else echo "No new symbols found." ; \
792 fi ; rm TMP
793
794\f
67ec3667 795
ad6b30a0 796MOSTLYCLEANFILES = \
23ccb831 797 scmconfig.h scmconfig.h.tmp
ad6b30a0 798
1c33be99 799CLEANFILES = libpath.h *.x *.doc guile-procedures.txt guile-procedures.texi guile.texi
ee0c0e03
ML
800
801MAINTAINERCLEANFILES = c-tokenize.c