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