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