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