Commit | Line | Data |
---|---|---|
733943b9 | 1 | ## Process this file with Automake to create Makefile.in |
2764bd99 | 2 | ## |
63181a97 | 3 | ## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 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 | |
19 | ## to the Free Software Foundation, Inc., 59 Temple Place, Suite | |
20 | ## 330, Boston, MA 02111-1307 USA | |
733943b9 | 21 | |
3307df95 | 22 | AUTOMAKE_OPTIONS = gnu |
733943b9 | 23 | |
a0599745 | 24 | ## Prevent automake from adding extra -I options |
8f99e3f3 | 25 | DEFS = @DEFS@ |
733943b9 TT |
26 | ## Check for headers in $(srcdir)/.., so that #include |
27 | ## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're | |
28 | ## building. | |
45cf70fa | 29 | INCLUDES = -I.. -I$(top_srcdir) -I$(top_srcdir)/libguile-ltdl |
733943b9 | 30 | |
4079f87e | 31 | ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \ |
abc049a9 | 32 | --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/' |
fef07353 | 33 | |
e13d8dc0 | 34 | lib_LTLIBRARIES = libguile.la |
f94b6524 | 35 | bin_PROGRAMS = guile |
b32fca0f | 36 | |
64c2db80 RB |
37 | noinst_PROGRAMS = guile_filter_doc_snarfage gen-scmconfig |
38 | ||
39 | gen_scmconfig_SOURCES = gen-scmconfig.c | |
40 | ||
41 | ## Override default rule; this should be compiled for BUILD host. | |
42 | ## For some reason, OBJEXT does not include the dot | |
43 | gen-scmconfig.$(OBJEXT): gen-scmconfig.c | |
44 | if [ "$(cross_compiling)" = "yes" ]; then \ | |
2e945bcc | 45 | $(CC_FOR_BUILD) $(DEFS) $(INCLUDES) -c -o $@ $<; \ |
64c2db80 RB |
46 | else \ |
47 | $(COMPILE) -c -o $@ $<; \ | |
48 | fi | |
49 | ||
2e945bcc SJ |
50 | ## Override default rule; this should run on BUILD host. |
51 | gen-scmconfig$(EXEEXT): $(gen_scmconfig_OBJECTS) $(gen_scmconfig_DEPENDENCIES) | |
52 | @rm -f gen-scmconfig$(EXEEXT) | |
53 | if [ "$(cross_compiling)" = "yes" ]; then \ | |
54 | $(CCLD_FOR_BUILD) -o $@ $(gen_scmconfig_OBJECTS); \ | |
55 | else \ | |
56 | $(LINK) $(gen_scmconfig_OBJECTS) $(LDADD) $(LIBS); \ | |
57 | fi | |
58 | ||
59 | scmconfig.h: ${top_builddir}/config.h gen-scmconfig$(EXEEXT) | |
64c2db80 | 60 | rm -f scmconfig.h.tmp |
eaf94f77 | 61 | cat $(srcdir)/scmconfig.h.top > scmconfig.h.tmp |
2e945bcc | 62 | ./gen-scmconfig$(EXEEXT) >> scmconfig.h.tmp |
64c2db80 RB |
63 | chmod 444 scmconfig.h.tmp |
64 | rm -f scmconfig.h | |
65 | mv scmconfig.h.tmp scmconfig.h | |
66 | ||
b32fca0f MV |
67 | guile_filter_doc_snarfage_SOURCES = c-tokenize.c |
68 | ||
69 | ## Override default rule; this should be compiled for BUILD host. | |
70 | ## For some reason, OBJEXT does not include the dot | |
71 | c-tokenize.$(OBJEXT): c-tokenize.c | |
72 | if [ "$(cross_compiling)" = "yes" ]; then \ | |
2e945bcc | 73 | $(CC_FOR_BUILD) $(DEFS) $(INCLUDES) -c -o $@ $<; \ |
b32fca0f | 74 | else \ |
93eaa2a2 | 75 | $(COMPILE) -c -o $@ $<; \ |
b32fca0f MV |
76 | fi |
77 | ||
78 | ## Override default rule; this should run on BUILD host. | |
79 | guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS) $(guile_filter_doc_snarfage_DEPENDENCIES) | |
80 | @rm -f guile_filter_doc_snarfage$(EXEEXT) | |
81 | if [ "$(cross_compiling)" = "yes" ]; then \ | |
82 | $(CCLD_FOR_BUILD) -o $@ $(guile_filter_doc_snarfage_OBJECTS); \ | |
83 | else \ | |
84 | $(LINK) $(guile_filter_doc_snarfage_OBJECTS) $(LDADD) $(LIBS); \ | |
85 | fi | |
86 | ||
549436de JB |
87 | |
88 | guile_SOURCES = guile.c | |
5bbc5359 | 89 | guile_CFLAGS = $(GUILE_CFLAGS) |
8f99e3f3 | 90 | guile_LDADD = libguile.la |
5bbc5359 MV |
91 | guile_LDFLAGS = @DLPREOPEN@ $(GUILE_CFLAGS) |
92 | ||
93 | libguile_la_CFLAGS = $(GUILE_CFLAGS) | |
ee2a8b9b | 94 | |
438b2738 | 95 | libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c \ |
c70de3c7 | 96 | chars.c continuations.c convert.c debug.c deprecation.c deprecated.c \ |
4f1d009f MV |
97 | discouraged.c dynwind.c environments.c eq.c error.c eval.c \ |
98 | evalext.c extensions.c \ | |
756414cf | 99 | feature.c fluids.c fports.c futures.c \ |
5dacb21f | 100 | gc.c gc-mark.c gc-segment.c gc-malloc.c gc-card.c gc-freelist.c \ |
c8a1bdc4 | 101 | gc_os_dep.c gdbint.c gh_data.c gh_eval.c gh_funcs.c gh_init.c \ |
438b2738 | 102 | gh_io.c gh_list.c gh_predicates.c goops.c gsubr.c guardians.c hash.c \ |
88686555 | 103 | hashtab.c hooks.c i18n.c init.c inline.c ioext.c keywords.c \ |
9b7ee9d8 | 104 | lang.c list.c \ |
438b2738 MV |
105 | load.c macros.c mallocs.c modules.c numbers.c objects.c objprop.c \ |
106 | options.c pairs.c ports.c print.c procprop.c procs.c properties.c \ | |
107 | random.c rdelim.c read.c root.c rw.c scmsigs.c script.c simpos.c smob.c \ | |
63181a97 | 108 | sort.c srcprop.c stackchk.c stacks.c stime.c strings.c srfi-13.c srfi-14.c \ |
5dacb21f | 109 | strorder.c strports.c struct.c symbols.c threads.c throw.c values.c \ |
dee01b01 | 110 | variable.c vectors.c version.c vports.c weaks.c |
03416a99 | 111 | |
4f1d009f MV |
112 | DOT_X_FILES = alist.x arbiters.x async.x backtrace.x boolean.x chars.x \ |
113 | continuations.x debug.x deprecation.x deprecated.x discouraged.x \ | |
114 | dynl.x dynwind.x \ | |
115 | environments.x eq.x \ | |
116 | error.x eval.x evalext.x extensions.x feature.x fluids.x fports.x \ | |
117 | futures.x \ | |
118 | gc.x gc-mark.x gc-segment.x gc-malloc.x gc-card.x goops.x \ | |
88686555 | 119 | gsubr.x guardians.x hash.x hashtab.x hooks.x i18n.x init.x ioext.x \ |
4f1d009f MV |
120 | keywords.x lang.x list.x load.x macros.x mallocs.x modules.x \ |
121 | numbers.x objects.x objprop.x options.x pairs.x ports.x print.x \ | |
122 | procprop.x procs.x properties.x random.x rdelim.x read.x root.x rw.x \ | |
123 | scmsigs.x script.x simpos.x smob.x sort.x srcprop.x \ | |
63181a97 | 124 | stackchk.x stacks.x stime.x strings.x srfi-13.x srfi-14.x strorder.x strports.x \ |
4f1d009f | 125 | struct.x symbols.x threads.x throw.x values.x variable.x vectors.x \ |
dee01b01 | 126 | version.x vports.x weaks.x |
8bee78b3 | 127 | |
e9e225e5 | 128 | EXTRA_DOT_X_FILES = @EXTRA_DOT_X_FILES@ |
8bee78b3 | 129 | |
86d31dfe | 130 | DOT_DOC_FILES = alist.doc arbiters.doc async.doc backtrace.doc \ |
c70de3c7 | 131 | boolean.doc chars.doc continuations.doc debug.doc deprecation.doc \ |
4f1d009f MV |
132 | deprecated.doc discouraged.doc dynl.doc dynwind.doc \ |
133 | environments.doc eq.doc \ | |
c70de3c7 | 134 | error.doc eval.doc evalext.doc \ |
756414cf MD |
135 | extensions.doc feature.doc fluids.doc fports.doc futures.doc \ |
136 | gc.doc goops.doc \ | |
c70de3c7 | 137 | gsubr.doc gc-mark.doc gc-segment.doc gc-malloc.doc gc-card.doc \ |
88686555 MV |
138 | guardians.doc hash.doc hashtab.doc hooks.doc i18n.doc init.doc \ |
139 | ioext.doc keywords.doc lang.doc list.doc load.doc macros.doc \ | |
86d31dfe MV |
140 | mallocs.doc modules.doc numbers.doc objects.doc objprop.doc \ |
141 | options.doc pairs.doc ports.doc print.doc procprop.doc \ | |
b0e5fd8c | 142 | procs.doc properties.doc random.doc rdelim.doc read.doc root.doc rw.doc \ |
86d31dfe | 143 | scmsigs.doc script.doc simpos.doc smob.doc sort.doc \ |
63181a97 | 144 | srcprop.doc stackchk.doc stacks.doc stime.doc strings.doc srfi-13.doc srfi-14.doc \ |
5dacb21f | 145 | strorder.doc strports.doc struct.doc symbols.doc threads.doc throw.doc \ |
dee01b01 | 146 | values.doc variable.doc vectors.doc version.doc vports.doc weaks.doc |
a3365d47 | 147 | |
2ce88b54 | 148 | EXTRA_DOT_DOC_FILES = @EXTRA_DOT_DOC_FILES@ |
9515eae6 | 149 | |
64c2db80 RB |
150 | BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h \ |
151 | version.h scmconfig.h \ | |
cecb4a5e | 152 | $(DOT_X_FILES) $(EXTRA_DOT_X_FILES) guile.texi |
9515eae6 | 153 | |
f731051e MV |
154 | EXTRA_libguile_la_SOURCES = _scm.h \ |
155 | inet_aton.c memmove.c putenv.c strerror.c \ | |
156 | dynl.c regex-posix.c \ | |
157 | filesys.c posix.c net_db.c socket.c \ | |
158 | ramap.c unif.c debug-malloc.c mkstemp.c \ | |
b4e15479 | 159 | win32-uname.c win32-dirent.c win32-socket.c |
7bfd3b9e | 160 | |
413a1367 ML |
161 | ## delete guile-snarf.awk from the installation bindir, in case it's |
162 | ## lingering there due to an earlier guile version not having been | |
163 | ## wiped out. | |
164 | install-exec-hook: | |
b27b814d | 165 | rm -f $(DESTDIR)$(bindir)/guile-snarf.awk |
413a1367 | 166 | |
7bfd3b9e | 167 | ## This is kind of nasty... there are ".c" files that we don't want to |
1be6b49c ML |
168 | ## compile, since they are #included. So instead we list them here. |
169 | ## Perhaps we can deal with them normally once the merge seems to be | |
170 | ## working. | |
5ad8c0c9 | 171 | noinst_HEADERS = convert.i.c \ |
7ff8176b | 172 | conv-integer.i.c conv-uinteger.i.c \ |
340c49bf MV |
173 | win32-uname.h win32-dirent.h win32-socket.h \ |
174 | private-gc.h | |
7bfd3b9e | 175 | |
78bda5f3 | 176 | libguile_la_DEPENDENCIES = @LIBLOBJS@ |
5bbc5359 | 177 | libguile_la_LIBADD = @LIBLOBJS@ ../libguile-ltdl/libguile-ltdl.la |
88686555 | 178 | libguile_la_LDFLAGS = @LTLIBINTL@ -version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ -export-dynamic -no-undefined |
733943b9 | 179 | |
54f16aec | 180 | # These are headers visible as <guile/mumble.h> |
ee2a8b9b JB |
181 | pkginclude_HEADERS = gh.h |
182 | ||
733943b9 | 183 | # These are headers visible as <libguile/mumble.h>. |
5380de6b | 184 | modincludedir = $(includedir)/libguile |
03416a99 | 185 | modinclude_HEADERS = __scm.h alist.h arbiters.h async.h backtrace.h boolean.h \ |
340c49bf | 186 | chars.h continuations.h convert.h debug.h \ |
29717c89 | 187 | debug-malloc.h threads-plugin.h null-threads.h pthread-threads.h \ |
4f1d009f MV |
188 | deprecation.h deprecated.h discouraged.h dynl.h dynwind.h \ |
189 | environments.h eq.h \ | |
c70de3c7 | 190 | error.h eval.h \ |
756414cf MD |
191 | evalext.h extensions.h feature.h filesys.h fluids.h fports.h futures.h \ |
192 | gc.h gdb_interface.h gdbint.h \ | |
88686555 | 193 | goops.h gsubr.h guardians.h hash.h hashtab.h hooks.h i18n.h init.h \ |
9b7ee9d8 | 194 | inline.h ioext.h \ |
03416a99 KN |
195 | iselect.h keywords.h lang.h list.h load.h macros.h mallocs.h modules.h \ |
196 | net_db.h numbers.h objects.h objprop.h options.h pairs.h ports.h posix.h \ | |
197 | regex-posix.h print.h procprop.h procs.h properties.h random.h ramap.h \ | |
b0e5fd8c | 198 | rdelim.h read.h root.h rw.h scmsigs.h validate.h script.h simpos.h smob.h \ |
03416a99 | 199 | snarf.h socket.h sort.h srcprop.h stackchk.h stacks.h stime.h strings.h \ |
63181a97 | 200 | srfi-13.h srfi-14.h strorder.h strports.h struct.h symbols.h tags.h threads.h \ |
93ff93f6 | 201 | throw.h unif.h values.h variable.h vectors.h vports.h weaks.h |
4725c298 | 202 | |
93ff93f6 | 203 | nodist_modinclude_HEADERS = version.h scmconfig.h |
733943b9 | 204 | |
604a672e TTN |
205 | bin_SCRIPTS = guile-snarf |
206 | ||
f94b6524 TTN |
207 | # We can re-enable install for some of these if/when they are documented |
208 | # and people feel like maintaining them. For now, this is not the case. | |
604a672e | 209 | noinst_SCRIPTS = guile-doc-snarf guile-snarf-docs guile-func-name-check |
adb75a41 | 210 | |
41973b48 MV |
211 | EXTRA_DIST = ChangeLog-gh ChangeLog-scm ChangeLog-threads \ |
212 | ChangeLog-1996-1999 ChangeLog-2000 cpp_signal.c \ | |
a3451a59 MV |
213 | cpp_errno.c cpp_err_symbols.in cpp_err_symbols.c \ |
214 | cpp_sig_symbols.c cpp_sig_symbols.in cpp_cnvt.awk \ | |
eaf94f77 | 215 | c-tokenize.lex threads-plugin.c version.h.in pthread-threads.c \ |
b6e738d1 | 216 | scmconfig.h.top gettext.h |
c99f9605 ML |
217 | # $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \ |
218 | # guile-procedures.txt guile.texi | |
733943b9 | 219 | |
d8a20ddb RB |
220 | ## We use @-...-@ as the substitution brackets here, instead of the |
221 | ## usual @...@, so autoconf doesn't go and substitute the values | |
222 | ## directly into the left-hand sides of the sed substitutions. *sigh* | |
223 | version.h: version.h.in | |
9bc4701c | 224 | sed < $< > $@.tmp \ |
d8a20ddb RB |
225 | -e s:@-GUILE_MAJOR_VERSION-@:${GUILE_MAJOR_VERSION}: \ |
226 | -e s:@-GUILE_MINOR_VERSION-@:${GUILE_MINOR_VERSION}: \ | |
227 | -e s:@-GUILE_MICRO_VERSION-@:${GUILE_MICRO_VERSION}: | |
228 | mv $@.tmp $@ | |
229 | ||
fef07353 | 230 | ## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds. |
90ff3ec5 | 231 | libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status |
54f16aec | 232 | @echo "Generating libpath.h..." |
e151bee6 JB |
233 | @rm -f libpath.tmp |
234 | @echo '/* generated by Makefile */' > libpath.tmp | |
235 | @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp | |
d8a20ddb | 236 | @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)"'>>libpath.tmp |
e151bee6 JB |
237 | @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp |
238 | @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp | |
239 | @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp | |
c565712c | 240 | @echo ' { "top_srcdir", "@top_srcdir_absolute@" }, \' >> libpath.tmp |
e151bee6 JB |
241 | @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp |
242 | @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp | |
243 | @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp | |
244 | @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp | |
245 | @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp | |
246 | @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp | |
247 | @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp | |
248 | @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp | |
249 | @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp | |
250 | @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp | |
251 | @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp | |
252 | @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp | |
253 | @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp | |
254 | @echo ' { "pkgdatadir", "$(datadir)/@PACKAGE@" }, \' >> libpath.tmp | |
255 | @echo ' { "pkglibdir", "$(libdir)/@PACKAGE@" }, \' >> libpath.tmp | |
256 | @echo ' { "pkgincludedir", "$(includedir)/@PACKAGE@" }, \' \ | |
257 | >> libpath.tmp | |
b6fae158 | 258 | @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp |
54f16aec TTN |
259 | @echo ' { "libguileinterface", "@LIBGUILE_INTERFACE@" }, \' \ |
260 | >> libpath.tmp | |
30dda257 | 261 | @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp |
5bbc5359 | 262 | @echo ' { "CFLAGS", "@GUILE_CFLAGS@" }, \' >> libpath.tmp |
54f16aec | 263 | @echo ' { "buildstamp", "'"`date`"'" }, \' >> libpath.tmp |
e151bee6 JB |
264 | @echo '}' >> libpath.tmp |
265 | @mv libpath.tmp libpath.h | |
733943b9 | 266 | |
3dc81fba | 267 | |
e9c3d3f9 TTN |
268 | snarfcppopts = $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) |
269 | ||
3dc81fba | 270 | SUFFIXES = .x .doc |
733943b9 | 271 | .c.x: |
2c7a286a | 272 | ./guile-snarf -o $@ $< $(snarfcppopts) |
c99f9605 ML |
273 | .c.doc: |
274 | -(test -n "${AWK+set}" || AWK="@AWK@"; ${AWK} -f ./guile-func-name-check $<) | |
e9c3d3f9 | 275 | (./guile-snarf-docs $(snarfcppopts) $< | \ |
af68e5e5 | 276 | ./guile_filter_doc_snarfage$(EXEEXT) --filter-snarfage) > $@ || { rm $@; false; } |
733943b9 | 277 | |
c99f9605 ML |
278 | $(DOT_X_FILES) $(EXTRA_DOT_DOC_FILES): snarf.h guile-snarf.in |
279 | ||
94b1762d | 280 | $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES): snarf.h guile-snarf-docs.in guile_filter_doc_snarfage$(EXEEXT) |
66418d34 | 281 | |
faf6a29b MV |
282 | error.x: cpp_err_symbols.c |
283 | posix.x: cpp_sig_symbols.c | |
284 | load.x: libpath.h | |
285 | ||
58ed8bc6 | 286 | include $(top_srcdir)/am/pre-inst-guile |
cecb4a5e | 287 | |
f8241358 | 288 | alldotdocfiles = $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) |
b32fca0f | 289 | snarf2checkedtexi = GUILE="$(GUILE_FOR_BUILD)" $(top_srcdir)/scripts/snarf-check-and-output-texi |
f8241358 TTN |
290 | dotdoc2texi = cat $(alldotdocfiles) | $(snarf2checkedtexi) |
291 | ||
2e945bcc | 292 | guile.texi: $(alldotdocfiles) guile$(EXEEXT) |
f8241358 TTN |
293 | $(dotdoc2texi) --manual > $@ || { rm $@; false; } |
294 | ||
2e945bcc | 295 | guile-procedures.texi: $(alldotdocfiles) guile$(EXEEXT) |
f8241358 | 296 | $(dotdoc2texi) > $@ || { rm $@; false; } |
9d29e990 | 297 | |
9df3eecc MV |
298 | if HAVE_MAKEINFO |
299 | ||
cecb4a5e | 300 | guile-procedures.txt: guile-procedures.texi |
9d29e990 | 301 | rm -f $@ |
f7742034 | 302 | makeinfo --force -o $@ guile-procedures.texi || test -f $@ |
4079f87e | 303 | |
9df3eecc MV |
304 | else |
305 | ||
306 | guile-procedures.txt: guile-procedures.texi | |
f7742034 | 307 | cp guile-procedures.texi $@ |
9df3eecc MV |
308 | |
309 | endif | |
310 | ||
30e3be5a | 311 | c-tokenize.c: c-tokenize.lex |
47ac1e47 | 312 | flex -t $(srcdir)/c-tokenize.lex > $@ || { rm $@; false; } |
30e3be5a | 313 | |
d8a20ddb | 314 | schemelibdir = $(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION) |
8dc9439f | 315 | schemelib_DATA = guile-procedures.txt |
4079f87e | 316 | |
733943b9 TT |
317 | ## Add -MG to make the .x magic work with auto-dep code. |
318 | MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) | |
ee78fbb0 | 319 | |
a9c093e2 | 320 | cpp_err_symbols.c: cpp_err_symbols.in cpp_cnvt.awk |
a0e90145 | 321 | $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \ |
593d151f JB |
322 | cpp_err_symbols.tmp |
323 | mv cpp_err_symbols.tmp cpp_err_symbols.c | |
ee78fbb0 | 324 | |
a9c093e2 | 325 | cpp_sig_symbols.c: cpp_sig_symbols.in cpp_cnvt.awk |
a0e90145 | 326 | $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \ |
593d151f JB |
327 | cpp_sig_symbols.tmp |
328 | mv cpp_sig_symbols.tmp cpp_sig_symbols.c | |
67ec3667 | 329 | |
a0e90145 | 330 | ## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX |
67ec3667 GH |
331 | ## macros defined on this platform. |
332 | check_signals: | |
333 | gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \ | |
334 | | cut -f2 -d' ' | sort > cpp_sig_symbols_here | |
a0e90145 JB |
335 | diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \ |
336 | | egrep '^\+S' \ | |
67ec3667 GH |
337 | | cut -c2- > cpp_sig_symbols_diff |
338 | if test -s cpp_sig_symbols_diff ; then \ | |
a0e90145 | 339 | cat $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_diff \ |
67ec3667 GH |
340 | | sort > cpp_sig_symbols_new ;\ |
341 | echo "cpp_sig_symbols_new has the following additions:" ;\ | |
342 | cat cpp_sig_symbols_diff ;\ | |
343 | else echo "No new symbols found."; \ | |
344 | fi | |
345 | ||
a0e90145 | 346 | ## Likewise for cpp_err_symbols.in. |
67ec3667 GH |
347 | check_errnos: |
348 | gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \ | |
349 | | cut -f2 -d' ' | sort > cpp_err_symbols_here | |
a0e90145 JB |
350 | diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \ |
351 | | egrep '^\+E' \ | |
67ec3667 GH |
352 | | cut -c2- > cpp_err_symbols_diff |
353 | if test -s cpp_err_symbols_diff ; then \ | |
a0e90145 | 354 | cat $(srcdir)/cpp_err_symbols.in cpp_err_symbols_diff \ |
67ec3667 GH |
355 | | sort > cpp_err_symbols_new ;\ |
356 | echo "cpp_err_symbols_new has the following additions:" ;\ | |
357 | cat cpp_err_symbols_diff ;\ | |
358 | else echo "No new symbols found."; \ | |
359 | fi | |
360 | ||
ad6b30a0 TP |
361 | MOSTLYCLEANFILES = \ |
362 | cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \ | |
d8a20ddb RB |
363 | cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new \ |
364 | version.h version.h.tmp \ | |
365 | scmconfig.h scmconfig.h.tmp | |
ad6b30a0 | 366 | |
cecb4a5e | 367 | CLEANFILES = libpath.h *.x *.doc guile-procedures.txt guile-procedures.texi guile.texi |
ee0c0e03 ML |
368 | |
369 | MAINTAINERCLEANFILES = c-tokenize.c |