Commit | Line | Data |
---|---|---|
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 | ## |
2764bd99 JB |
7 | ## GUILE is free software; you can redistribute it and/or modify |
8 | ## it under the terms of the GNU General Public License as | |
9 | ## published by the Free Software Foundation; either version 2, or | |
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 | |
15 | ## GNU General Public License for more details. | |
54f16aec | 16 | ## |
2764bd99 JB |
17 | ## You should have received a copy of the GNU General Public |
18 | ## License along with GUILE; see the file COPYING. If not, write | |
92205699 MV |
19 | ## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth |
20 | ## Floor, Boston, MA 02110-1301 USA | |
733943b9 | 21 | |
3307df95 | 22 | AUTOMAKE_OPTIONS = gnu |
733943b9 | 23 | |
a0599745 | 24 | ## Prevent automake from adding extra -I options |
8f99e3f3 | 25 | DEFS = @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>. | |
30 | DEFAULT_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 | 35 | AM_CPPFLAGS = -DBUILDING_LIBGUILE=1 -I$(top_srcdir) -I$(top_builddir) \ |
47871d5a | 36 | -I$(top_srcdir)/lib -I$(top_builddir)/lib |
6caac03c | 37 | |
442f3f20 | 38 | AM_CFLAGS = $(GCC_CFLAGS) $(CFLAG_VISIBILITY) |
6caac03c LC |
39 | |
40 | ## The Gnulib Libtool archive. | |
41 | gnulib_library = $(top_builddir)/lib/libgnu.la | |
733943b9 | 42 | |
4079f87e | 43 | ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \ |
abc049a9 | 44 | --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/' |
fef07353 | 45 | |
b89c4943 LC |
46 | lib_LTLIBRARIES = libguile.la \ |
47 | libguile-i18n-v-@LIBGUILE_I18N_MAJOR@.la | |
f94b6524 | 48 | bin_PROGRAMS = guile |
b32fca0f | 49 | |
64c2db80 RB |
50 | noinst_PROGRAMS = guile_filter_doc_snarfage gen-scmconfig |
51 | ||
52 | gen_scmconfig_SOURCES = gen-scmconfig.c | |
53 | ||
54 | ## Override default rule; this should be compiled for BUILD host. | |
55 | ## For some reason, OBJEXT does not include the dot | |
56 | gen-scmconfig.$(OBJEXT): gen-scmconfig.c | |
57 | if [ "$(cross_compiling)" = "yes" ]; then \ | |
47871d5a | 58 | $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) -c -o $@ $<; \ |
64c2db80 RB |
59 | else \ |
60 | $(COMPILE) -c -o $@ $<; \ | |
61 | fi | |
62 | ||
2e945bcc SJ |
63 | ## Override default rule; this should run on BUILD host. |
64 | gen-scmconfig$(EXEEXT): $(gen_scmconfig_OBJECTS) $(gen_scmconfig_DEPENDENCIES) | |
65 | @rm -f gen-scmconfig$(EXEEXT) | |
66 | if [ "$(cross_compiling)" = "yes" ]; then \ | |
67 | $(CCLD_FOR_BUILD) -o $@ $(gen_scmconfig_OBJECTS); \ | |
68 | else \ | |
69 | $(LINK) $(gen_scmconfig_OBJECTS) $(LDADD) $(LIBS); \ | |
70 | fi | |
71 | ||
72 | scmconfig.h: ${top_builddir}/config.h gen-scmconfig$(EXEEXT) | |
64c2db80 | 73 | rm -f scmconfig.h.tmp |
eaf94f77 | 74 | cat $(srcdir)/scmconfig.h.top > scmconfig.h.tmp |
2e945bcc | 75 | ./gen-scmconfig$(EXEEXT) >> scmconfig.h.tmp |
64c2db80 RB |
76 | chmod 444 scmconfig.h.tmp |
77 | rm -f scmconfig.h | |
78 | mv scmconfig.h.tmp scmconfig.h | |
79 | ||
b32fca0f MV |
80 | guile_filter_doc_snarfage_SOURCES = c-tokenize.c |
81 | ||
82 | ## Override default rule; this should be compiled for BUILD host. | |
83 | ## For some reason, OBJEXT does not include the dot | |
84 | c-tokenize.$(OBJEXT): c-tokenize.c | |
85 | if [ "$(cross_compiling)" = "yes" ]; then \ | |
47871d5a | 86 | $(CC_FOR_BUILD) $(DEFS) $(AM_CPPFLAGS) -c -o $@ $<; \ |
b32fca0f | 87 | else \ |
d3518113 | 88 | $(filter-out -Werror,$(COMPILE)) -c -o $@ $<; \ |
b32fca0f MV |
89 | fi |
90 | ||
91 | ## Override default rule; this should run on BUILD host. | |
92 | guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS) $(guile_filter_doc_snarfage_DEPENDENCIES) | |
93 | @rm -f guile_filter_doc_snarfage$(EXEEXT) | |
94 | if [ "$(cross_compiling)" = "yes" ]; then \ | |
95 | $(CCLD_FOR_BUILD) -o $@ $(guile_filter_doc_snarfage_OBJECTS); \ | |
96 | else \ | |
97 | $(LINK) $(guile_filter_doc_snarfage_OBJECTS) $(LDADD) $(LIBS); \ | |
98 | fi | |
99 | ||
549436de JB |
100 | |
101 | guile_SOURCES = guile.c | |
582a4997 | 102 | guile_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS) |
8f99e3f3 | 103 | guile_LDADD = libguile.la |
de7d32d0 | 104 | guile_LDFLAGS = $(GUILE_CFLAGS) |
5bbc5359 | 105 | |
582a4997 | 106 | libguile_la_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS) |
ee2a8b9b | 107 | |
06f9c814 | 108 | libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c \ |
1ee2c72e LC |
109 | bytevectors.c chars.c continuations.c \ |
110 | convert.c debug.c deprecation.c \ | |
dd18d312 | 111 | deprecated.c discouraged.c dynwind.c eq.c error.c \ |
06f9c814 MV |
112 | eval.c evalext.c extensions.c feature.c fluids.c fports.c \ |
113 | futures.c gc.c gc-mark.c gc-segment.c gc-malloc.c gc-card.c \ | |
82ae1b8e | 114 | gc-freelist.c gc_os_dep.c gdbint.c gettext.c gc-segment-table.c \ |
89bc270d | 115 | goops.c gsubr.c \ |
b89c4943 | 116 | guardians.c hash.c hashtab.c hooks.c init.c inline.c \ |
06f9c814 MV |
117 | ioext.c keywords.c lang.c list.c load.c macros.c mallocs.c \ |
118 | modules.c numbers.c objects.c objprop.c options.c pairs.c ports.c \ | |
1ee2c72e LC |
119 | print.c procprop.c procs.c properties.c \ |
120 | r6rs-ports.c random.c rdelim.c read.c \ | |
06f9c814 MV |
121 | root.c rw.c scmsigs.c script.c simpos.c smob.c sort.c srcprop.c \ |
122 | stackchk.c stacks.c stime.c strings.c srfi-4.c srfi-13.c srfi-14.c \ | |
9b7952c0 MV |
123 | strorder.c strports.c struct.c symbols.c threads.c null-threads.c \ |
124 | throw.c values.c variable.c vectors.c version.c vports.c weaks.c \ | |
125 | ramap.c unif.c | |
06f9c814 | 126 | |
83495480 AW |
127 | # vm-related sources |
128 | libguile_la_SOURCES += frames.c instructions.c objcodes.c programs.c vm.c | |
129 | ||
b89c4943 LC |
130 | libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_SOURCES = i18n.c |
131 | libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_CFLAGS = \ | |
132 | $(libguile_la_CFLAGS) | |
133 | libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD = \ | |
6caac03c | 134 | libguile.la $(gnulib_library) |
b89c4943 LC |
135 | libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LDFLAGS = \ |
136 | -module -L$(builddir) -lguile \ | |
137 | -version-info @LIBGUILE_I18N_INTERFACE@ | |
138 | ||
1ee2c72e LC |
139 | DOT_X_FILES = alist.x arbiters.x async.x backtrace.x boolean.x \ |
140 | bytevectors.x chars.x \ | |
06f9c814 | 141 | continuations.x debug.x deprecation.x deprecated.x discouraged.x \ |
dd18d312 | 142 | dynl.x dynwind.x eq.x error.x eval.x evalext.x \ |
06f9c814 | 143 | extensions.x feature.x fluids.x fports.x futures.x gc.x gc-mark.x \ |
b89c4943 | 144 | gc-segment.x gc-malloc.x gc-card.x gettext.x goops.x \ |
82ae1b8e | 145 | gsubr.x guardians.x gc-segment-table.x \ |
06f9c814 MV |
146 | hash.x hashtab.x hooks.x i18n.x init.x ioext.x keywords.x lang.x \ |
147 | list.x load.x macros.x mallocs.x modules.x numbers.x objects.x \ | |
148 | objprop.x options.x pairs.x ports.x print.x procprop.x procs.x \ | |
1ee2c72e LC |
149 | properties.x r6rs-ports.x random.x rdelim.x \ |
150 | read.x root.x rw.x scmsigs.x \ | |
06f9c814 MV |
151 | script.x simpos.x smob.x sort.x srcprop.x stackchk.x stacks.x \ |
152 | stime.x strings.x srfi-4.x srfi-13.x srfi-14.x strorder.x \ | |
153 | strports.x struct.x symbols.x threads.x throw.x values.x \ | |
154 | variable.x vectors.x version.x vports.x weaks.x ramap.x unif.x | |
8bee78b3 | 155 | |
83495480 AW |
156 | # vm-related snarfs |
157 | DOT_X_FILES += frames.x instructions.x objcodes.x programs.x vm.x | |
158 | ||
e9e225e5 | 159 | EXTRA_DOT_X_FILES = @EXTRA_DOT_X_FILES@ |
8bee78b3 | 160 | |
06f9c814 | 161 | DOT_DOC_FILES = alist.doc arbiters.doc async.doc backtrace.doc \ |
1ee2c72e LC |
162 | boolean.doc bytevectors.doc chars.doc \ |
163 | continuations.doc debug.doc deprecation.doc \ | |
06f9c814 | 164 | deprecated.doc discouraged.doc dynl.doc dynwind.doc \ |
dd18d312 | 165 | eq.doc error.doc eval.doc evalext.doc \ |
06f9c814 | 166 | extensions.doc feature.doc fluids.doc fports.doc futures.doc \ |
82ae1b8e HWN |
167 | gc.doc goops.doc gsubr.doc gc-mark.doc gc-segment.doc \ |
168 | gc-malloc.doc gc-card.doc gettext.doc gc-segment-table.doc \ | |
b89c4943 | 169 | guardians.doc hash.doc hashtab.doc \ |
06f9c814 MV |
170 | hooks.doc i18n.doc init.doc ioext.doc keywords.doc lang.doc \ |
171 | list.doc load.doc macros.doc mallocs.doc modules.doc numbers.doc \ | |
172 | objects.doc objprop.doc options.doc pairs.doc ports.doc print.doc \ | |
1ee2c72e LC |
173 | procprop.doc procs.doc properties.doc r6rs-ports.doc \ |
174 | random.doc rdelim.doc \ | |
06f9c814 MV |
175 | read.doc root.doc rw.doc scmsigs.doc script.doc simpos.doc \ |
176 | smob.doc sort.doc srcprop.doc stackchk.doc stacks.doc stime.doc \ | |
177 | strings.doc srfi-4.doc srfi-13.doc srfi-14.doc strorder.doc \ | |
178 | strports.doc struct.doc symbols.doc threads.doc throw.doc \ | |
179 | values.doc variable.doc vectors.doc version.doc vports.doc \ | |
180 | weaks.doc ramap.doc unif.doc | |
a3365d47 | 181 | |
2ce88b54 | 182 | EXTRA_DOT_DOC_FILES = @EXTRA_DOT_DOC_FILES@ |
9515eae6 | 183 | |
83495480 AW |
184 | DOT_I_FILES = vm-i-system.i vm-i-scheme.i vm-i-loader.i |
185 | ||
186 | .c.i: | |
187 | grep '^VM_DEFINE' $< > $@ | |
188 | ||
64c2db80 RB |
189 | BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h \ |
190 | version.h scmconfig.h \ | |
83495480 | 191 | $(DOT_I_FILES) $(DOT_X_FILES) $(EXTRA_DOT_X_FILES) |
9515eae6 | 192 | |
f731051e MV |
193 | EXTRA_libguile_la_SOURCES = _scm.h \ |
194 | inet_aton.c memmove.c putenv.c strerror.c \ | |
195 | dynl.c regex-posix.c \ | |
196 | filesys.c posix.c net_db.c socket.c \ | |
b89c4943 LC |
197 | debug-malloc.c mkstemp.c \ |
198 | win32-uname.c win32-dirent.c win32-socket.c \ | |
199 | locale-categories.h | |
7bfd3b9e | 200 | |
413a1367 ML |
201 | ## delete guile-snarf.awk from the installation bindir, in case it's |
202 | ## lingering there due to an earlier guile version not having been | |
203 | ## wiped out. | |
204 | install-exec-hook: | |
b27b814d | 205 | rm -f $(DESTDIR)$(bindir)/guile-snarf.awk |
413a1367 | 206 | |
7bfd3b9e | 207 | ## This is kind of nasty... there are ".c" files that we don't want to |
1be6b49c ML |
208 | ## compile, since they are #included. So instead we list them here. |
209 | ## Perhaps we can deal with them normally once the merge seems to be | |
210 | ## working. | |
02e22775 | 211 | noinst_HEADERS = convert.i.c \ |
7ff8176b | 212 | conv-integer.i.c conv-uinteger.i.c \ |
1ee2c72e | 213 | eval.i.c ieee-754.h \ |
02e22775 | 214 | srfi-4.i.c \ |
06f9c814 | 215 | quicksort.i.c \ |
340c49bf | 216 | win32-uname.h win32-dirent.h win32-socket.h \ |
03291373 | 217 | private-gc.h private-options.h |
7bfd3b9e | 218 | |
83495480 AW |
219 | # vm instructions |
220 | noinst_HEADERS += vm-engine.c vm-i-system.c vm-i-scheme.c vm-i-loader.c | |
221 | ||
78bda5f3 | 222 | libguile_la_DEPENDENCIES = @LIBLOBJS@ |
6caac03c | 223 | libguile_la_LIBADD = @LIBLOBJS@ $(gnulib_library) |
88686555 | 224 | libguile_la_LDFLAGS = @LTLIBINTL@ -version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ -export-dynamic -no-undefined |
733943b9 | 225 | |
54f16aec | 226 | # These are headers visible as <guile/mumble.h> |
89bc270d | 227 | pkginclude_HEADERS = |
ee2a8b9b | 228 | |
733943b9 | 229 | # These are headers visible as <libguile/mumble.h>. |
5380de6b | 230 | modincludedir = $(includedir)/libguile |
9b7952c0 | 231 | modinclude_HEADERS = __scm.h alist.h arbiters.h async.h backtrace.h \ |
1ee2c72e LC |
232 | boolean.h bytevectors.h chars.h continuations.h convert.h \ |
233 | debug.h debug-malloc.h \ | |
9b7952c0 | 234 | deprecation.h deprecated.h discouraged.h dynl.h dynwind.h \ |
dd18d312 | 235 | eq.h error.h eval.h evalext.h extensions.h \ |
9b7952c0 | 236 | feature.h filesys.h fluids.h fports.h futures.h gc.h \ |
b89c4943 LC |
237 | gdb_interface.h gdbint.h gettext.h goops.h \ |
238 | gsubr.h guardians.h hash.h \ | |
9b7952c0 MV |
239 | hashtab.h hooks.h i18n.h init.h inline.h ioext.h iselect.h \ |
240 | keywords.h lang.h list.h load.h macros.h mallocs.h modules.h \ | |
241 | net_db.h numbers.h objects.h objprop.h options.h pairs.h ports.h \ | |
1ee2c72e LC |
242 | posix.h r6rs-ports.h regex-posix.h print.h \ |
243 | procprop.h procs.h properties.h \ | |
9b7952c0 MV |
244 | random.h ramap.h rdelim.h read.h root.h rw.h scmsigs.h validate.h \ |
245 | script.h simpos.h smob.h snarf.h socket.h sort.h srcprop.h \ | |
246 | stackchk.h stacks.h stime.h strings.h srfi-4.h srfi-13.h srfi-14.h \ | |
247 | strorder.h strports.h struct.h symbols.h tags.h threads.h \ | |
248 | pthread-threads.h null-threads.h throw.h unif.h values.h \ | |
249 | variable.h vectors.h vports.h weaks.h | |
4725c298 | 250 | |
83495480 AW |
251 | modinclude_HEADERS += vm-bootstrap.h frames.h instructions.h objcodes.h \ |
252 | programs.h vm.h vm-engine.h vm-expand.h | |
253 | ||
93ff93f6 | 254 | nodist_modinclude_HEADERS = version.h scmconfig.h |
733943b9 | 255 | |
604a672e TTN |
256 | bin_SCRIPTS = guile-snarf |
257 | ||
f94b6524 TTN |
258 | # We can re-enable install for some of these if/when they are documented |
259 | # and people feel like maintaining them. For now, this is not the case. | |
604a672e | 260 | noinst_SCRIPTS = guile-doc-snarf guile-snarf-docs guile-func-name-check |
adb75a41 | 261 | |
89bc270d | 262 | EXTRA_DIST = ChangeLog-scm ChangeLog-threads \ |
61db429e LC |
263 | ChangeLog-1996-1999 ChangeLog-2000 ChangeLog-2008 cpp_signal.c \ |
264 | cpp_errno.c cpp_err_symbols.in cpp_err_symbols.c \ | |
265 | cpp_sig_symbols.c cpp_sig_symbols.in cpp_cnvt.awk \ | |
266 | c-tokenize.lex version.h.in \ | |
23ccb831 | 267 | scmconfig.h.top libgettext.h |
c99f9605 ML |
268 | # $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \ |
269 | # guile-procedures.txt guile.texi | |
733943b9 | 270 | |
d8a20ddb RB |
271 | ## We use @-...-@ as the substitution brackets here, instead of the |
272 | ## usual @...@, so autoconf doesn't go and substitute the values | |
273 | ## directly into the left-hand sides of the sed substitutions. *sigh* | |
274 | version.h: version.h.in | |
8ab3d8a0 | 275 | sed < $(srcdir)/version.h.in > $@.tmp \ |
d8a20ddb RB |
276 | -e s:@-GUILE_MAJOR_VERSION-@:${GUILE_MAJOR_VERSION}: \ |
277 | -e s:@-GUILE_MINOR_VERSION-@:${GUILE_MINOR_VERSION}: \ | |
278 | -e s:@-GUILE_MICRO_VERSION-@:${GUILE_MICRO_VERSION}: | |
279 | mv $@.tmp $@ | |
280 | ||
fef07353 | 281 | ## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds. |
90ff3ec5 | 282 | libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status |
54f16aec | 283 | @echo "Generating libpath.h..." |
e151bee6 JB |
284 | @rm -f libpath.tmp |
285 | @echo '/* generated by Makefile */' > libpath.tmp | |
286 | @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp | |
d8a20ddb | 287 | @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)"'>>libpath.tmp |
e151bee6 | 288 | @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp |
5b197db8 AW |
289 | @echo '#define SCM_CCACHE_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/ccache"' >> libpath.tmp |
290 | @echo '#define SCM_EFFECTIVE_VERSION "$(GUILE_EFFECTIVE_VERSION)"' >> libpath.tmp | |
e151bee6 JB |
291 | @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp |
292 | @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp | |
c565712c | 293 | @echo ' { "top_srcdir", "@top_srcdir_absolute@" }, \' >> libpath.tmp |
e151bee6 JB |
294 | @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp |
295 | @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp | |
296 | @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp | |
297 | @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp | |
298 | @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp | |
299 | @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp | |
300 | @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp | |
301 | @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp | |
302 | @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp | |
303 | @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp | |
5b197db8 | 304 | @echo ' { "ccachedir", SCM_CCACHE_DIR }, \' >> libpath.tmp |
e151bee6 JB |
305 | @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp |
306 | @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp | |
307 | @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp | |
5b197db8 AW |
308 | @echo ' { "pkgdatadir", "@pkgdatadir@" }, \' >> libpath.tmp |
309 | @echo ' { "pkglibdir", "@pkglibdir@" }, \' >> libpath.tmp | |
310 | @echo ' { "pkgincludedir", "@pkgincludedir@" }, \' \ | |
e151bee6 | 311 | >> libpath.tmp |
b6fae158 | 312 | @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp |
54f16aec TTN |
313 | @echo ' { "libguileinterface", "@LIBGUILE_INTERFACE@" }, \' \ |
314 | >> libpath.tmp | |
30dda257 | 315 | @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp |
5bbc5359 | 316 | @echo ' { "CFLAGS", "@GUILE_CFLAGS@" }, \' >> libpath.tmp |
54f16aec | 317 | @echo ' { "buildstamp", "'"`date`"'" }, \' >> libpath.tmp |
e151bee6 JB |
318 | @echo '}' >> libpath.tmp |
319 | @mv libpath.tmp libpath.h | |
733943b9 | 320 | |
3dc81fba | 321 | |
47871d5a | 322 | snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) |
e9c3d3f9 | 323 | |
3dc81fba | 324 | SUFFIXES = .x .doc |
733943b9 | 325 | .c.x: |
2c7a286a | 326 | ./guile-snarf -o $@ $< $(snarfcppopts) |
c99f9605 | 327 | .c.doc: |
23d72566 | 328 | -$(AWK) -f ./guile-func-name-check $< |
e9c3d3f9 | 329 | (./guile-snarf-docs $(snarfcppopts) $< | \ |
af68e5e5 | 330 | ./guile_filter_doc_snarfage$(EXEEXT) --filter-snarfage) > $@ || { rm $@; false; } |
733943b9 | 331 | |
23f2b9a3 | 332 | $(DOT_X_FILES) $(EXTRA_DOT_X_FILES): scmconfig.h snarf.h guile-snarf.in |
c99f9605 | 333 | |
23f2b9a3 | 334 | $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES): scmconfig.h snarf.h guile-snarf-docs.in guile_filter_doc_snarfage$(EXEEXT) |
66418d34 | 335 | |
faf6a29b MV |
336 | error.x: cpp_err_symbols.c |
337 | posix.x: cpp_sig_symbols.c | |
338 | load.x: libpath.h | |
339 | ||
58ed8bc6 | 340 | include $(top_srcdir)/am/pre-inst-guile |
cecb4a5e | 341 | |
f8241358 | 342 | alldotdocfiles = $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) |
6d66647d | 343 | snarf2checkedtexi = $(top_builddir)/meta/uninstalled-env guile-tools snarf-check-and-output-texi |
f8241358 TTN |
344 | dotdoc2texi = cat $(alldotdocfiles) | $(snarf2checkedtexi) |
345 | ||
2e945bcc | 346 | guile.texi: $(alldotdocfiles) guile$(EXEEXT) |
f8241358 TTN |
347 | $(dotdoc2texi) --manual > $@ || { rm $@; false; } |
348 | ||
2e945bcc | 349 | guile-procedures.texi: $(alldotdocfiles) guile$(EXEEXT) |
f8241358 | 350 | $(dotdoc2texi) > $@ || { rm $@; false; } |
9d29e990 | 351 | |
9df3eecc MV |
352 | if HAVE_MAKEINFO |
353 | ||
cecb4a5e | 354 | guile-procedures.txt: guile-procedures.texi |
9d29e990 | 355 | rm -f $@ |
f7742034 | 356 | makeinfo --force -o $@ guile-procedures.texi || test -f $@ |
4079f87e | 357 | |
9df3eecc MV |
358 | else |
359 | ||
360 | guile-procedures.txt: guile-procedures.texi | |
f7742034 | 361 | cp guile-procedures.texi $@ |
9df3eecc MV |
362 | |
363 | endif | |
364 | ||
30e3be5a | 365 | c-tokenize.c: c-tokenize.lex |
47ac1e47 | 366 | flex -t $(srcdir)/c-tokenize.lex > $@ || { rm $@; false; } |
30e3be5a | 367 | |
d8a20ddb | 368 | schemelibdir = $(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION) |
8dc9439f | 369 | schemelib_DATA = guile-procedures.txt |
4079f87e | 370 | |
733943b9 | 371 | ## Add -MG to make the .x magic work with auto-dep code. |
47871d5a | 372 | MKDEP = gcc -M -MG $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) |
ee78fbb0 | 373 | |
a9c093e2 | 374 | cpp_err_symbols.c: cpp_err_symbols.in cpp_cnvt.awk |
a0e90145 | 375 | $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \ |
593d151f JB |
376 | cpp_err_symbols.tmp |
377 | mv cpp_err_symbols.tmp cpp_err_symbols.c | |
ee78fbb0 | 378 | |
a9c093e2 | 379 | cpp_sig_symbols.c: cpp_sig_symbols.in cpp_cnvt.awk |
a0e90145 | 380 | $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \ |
593d151f JB |
381 | cpp_sig_symbols.tmp |
382 | mv cpp_sig_symbols.tmp cpp_sig_symbols.c | |
67ec3667 | 383 | |
a0e90145 | 384 | ## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX |
67ec3667 GH |
385 | ## macros defined on this platform. |
386 | check_signals: | |
387 | gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \ | |
388 | | cut -f2 -d' ' | sort > cpp_sig_symbols_here | |
a0e90145 JB |
389 | diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \ |
390 | | egrep '^\+S' \ | |
67ec3667 GH |
391 | | cut -c2- > cpp_sig_symbols_diff |
392 | if test -s cpp_sig_symbols_diff ; then \ | |
a0e90145 | 393 | cat $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_diff \ |
67ec3667 GH |
394 | | sort > cpp_sig_symbols_new ;\ |
395 | echo "cpp_sig_symbols_new has the following additions:" ;\ | |
396 | cat cpp_sig_symbols_diff ;\ | |
397 | else echo "No new symbols found."; \ | |
398 | fi | |
399 | ||
a0e90145 | 400 | ## Likewise for cpp_err_symbols.in. |
67ec3667 GH |
401 | check_errnos: |
402 | gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \ | |
403 | | cut -f2 -d' ' | sort > cpp_err_symbols_here | |
a0e90145 JB |
404 | diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \ |
405 | | egrep '^\+E' \ | |
67ec3667 GH |
406 | | cut -c2- > cpp_err_symbols_diff |
407 | if test -s cpp_err_symbols_diff ; then \ | |
a0e90145 | 408 | cat $(srcdir)/cpp_err_symbols.in cpp_err_symbols_diff \ |
67ec3667 GH |
409 | | sort > cpp_err_symbols_new ;\ |
410 | echo "cpp_err_symbols_new has the following additions:" ;\ | |
411 | cat cpp_err_symbols_diff ;\ | |
412 | else echo "No new symbols found."; \ | |
413 | fi | |
414 | ||
ad6b30a0 TP |
415 | MOSTLYCLEANFILES = \ |
416 | cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \ | |
d8a20ddb RB |
417 | cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new \ |
418 | version.h version.h.tmp \ | |
23ccb831 | 419 | scmconfig.h scmconfig.h.tmp |
ad6b30a0 | 420 | |
84595266 AW |
421 | CLEANFILES = libpath.h *.x *.doc guile-procedures.txt guile-procedures.texi guile.texi \ |
422 | vm-i-*.i | |
ee0c0e03 ML |
423 | |
424 | MAINTAINERCLEANFILES = c-tokenize.c |