* inline.c, inline.h: New files.
[bpt/guile.git] / libguile / Makefile.am
1 ## Process this file with Automake to create Makefile.in
2 ##
3 ## Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
4 ##
5 ## This file is part of GUILE.
6 ##
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.
11 ##
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.
16 ##
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
21
22 AUTOMAKE_OPTIONS = gnu
23
24 ## Prevent automake from adding extra -I options
25 DEFS = @DEFS@
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.
29 INCLUDES = -I.. -I$(srcdir)/.. ${INCLTDL}
30
31 ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
32 --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
33
34 lib_LTLIBRARIES = libguile.la
35 bin_PROGRAMS = guile guile_filter_doc_snarfage
36
37 guile_SOURCES = guile.c
38 guile_LDADD = libguile.la
39 guile_LDFLAGS = @DLPREOPEN@
40
41 guile_filter_doc_snarfage_SOURCES = c-tokenize.c
42
43 libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c \
44 chars.c continuations.c debug.c deprecation.c dynl.c dynwind.c \
45 environments.c eq.c error.c eval.c evalext.c extensions.c \
46 feature.c fluids.c fports.c \
47 gc.c gc_os_dep.c gdbint.c gh_data.c gh_eval.c gh_funcs.c gh_init.c \
48 gh_io.c gh_list.c gh_predicates.c goops.c gsubr.c guardians.c hash.c \
49 hashtab.c hooks.c init.c inline.c ioext.c iselect.c keywords.c \
50 lang.c list.c \
51 load.c macros.c mallocs.c modules.c numbers.c objects.c objprop.c \
52 options.c pairs.c ports.c print.c procprop.c procs.c properties.c \
53 random.c rdelim.c read.c root.c rw.c scmsigs.c script.c simpos.c smob.c \
54 sort.c srcprop.c stackchk.c stacks.c stime.c strings.c strop.c \
55 strorder.c strports.c struct.c symbols.c throw.c values.c \
56 variable.c vectors.c version.c vports.c weaks.c
57
58 DOT_X_FILES = alist.x arbiters.x async.x backtrace.x boolean.x chars.x \
59 continuations.x debug.x deprecation.x dynl.x dynwind.x \
60 environments.x eq.x \
61 error.x eval.x evalext.x extensions.x feature.x fluids.x fports.x \
62 gc.x goops.x \
63 gsubr.x guardians.x hash.x hashtab.x hooks.x init.x ioext.x iselect.x \
64 keywords.x lang.x list.x load.x macros.x mallocs.x modules.x \
65 numbers.x objects.x objprop.x options.x pairs.x ports.x print.x \
66 procprop.x procs.x properties.x random.x rdelim.x read.x root.x rw.x \
67 scmsigs.x script.x simpos.x smob.x sort.x srcprop.x \
68 stackchk.x stacks.x stime.x strings.x strop.x strorder.x strports.x \
69 struct.x symbols.x throw.x values.x variable.x vectors.x \
70 version.x vports.x weaks.x
71
72 EXTRA_DOT_X_FILES = @EXTRA_DOT_X_FILES@
73
74 DOT_DOC_FILES = alist.doc arbiters.doc async.doc backtrace.doc \
75 boolean.doc chars.doc continuations.doc debug.doc dynl.doc \
76 dynwind.doc environments.doc eq.doc error.doc eval.doc evalext.doc \
77 extensions.doc feature.doc fluids.doc fports.doc gc.doc goops.doc \
78 gsubr.doc \
79 guardians.doc hash.doc hashtab.doc hooks.doc init.doc ioext.doc \
80 iselect.doc keywords.doc lang.doc list.doc load.doc macros.doc \
81 mallocs.doc modules.doc numbers.doc objects.doc objprop.doc \
82 options.doc pairs.doc ports.doc print.doc procprop.doc \
83 procs.doc properties.doc random.doc rdelim.doc read.doc root.doc rw.doc \
84 scmsigs.doc script.doc simpos.doc smob.doc sort.doc \
85 srcprop.doc stackchk.doc stacks.doc stime.doc strings.doc strop.doc \
86 strorder.doc strports.doc struct.doc symbols.doc throw.doc \
87 values.doc variable.doc vectors.doc version.doc vports.doc weaks.doc
88
89 EXTRA_DOT_DOC_FILES = @EXTRA_DOT_DOC_FILES@
90
91 BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h scmconfig.h \
92 $(DOT_X_FILES) $(EXTRA_DOT_X_FILES) guile.texi
93
94 EXTRA_libguile_la_SOURCES = _scm.h \
95 alloca.c inet_aton.c memmove.c putenv.c strerror.c \
96 threads.c regex-posix.c \
97 filesys.c posix.c net_db.c socket.c \
98 ramap.c unif.c debug-malloc.c mkstemp.c \
99 win32-uname.c win32-dirent.c win32-socket.c
100
101 ## In next release, threads will be factored out of libguile.
102 ## Until then, the machine specific headers is a temporary kludge.
103
104 # Seems to be obsolete - autogen.sh is giving:
105 # invalid unused variable name: `OMIT_DEPENDENCIES'
106 #OMIT_DEPENDENCIES = libguile.h ltdl.h \
107 # axp.h hppa.h i386.h ksr.h m88k.h mips.h sparc.h vax.h
108
109 ## delete guile-snarf.awk from the installation bindir, in case it's
110 ## lingering there due to an earlier guile version not having been
111 ## wiped out.
112 install-exec-hook:
113 rm -f $(DESTDIR)$(bindir)/guile-snarf.awk
114
115 ## This is kind of nasty... there are ".c" files that we don't want to
116 ## compile, since they are #included. So instead we list them here.
117 ## Perhaps we can deal with them normally once the merge seems to be
118 ## working.
119 noinst_HEADERS = coop-threads.c coop-threads.h coop.c \
120 num2integral.i.c num2float.i.c \
121 win32-uname.h win32-dirent.h win32-socket.h
122
123 libguile_la_DEPENDENCIES = @LIBLOBJS@
124 libguile_la_LIBADD = @LIBLOBJS@ $(LIBLTDL) $(THREAD_LIBS_LOCAL)
125 libguile_la_LDFLAGS = -version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ -export-dynamic -no-undefined
126
127 # These are headers visible as <guile/mumble.h>
128 pkginclude_HEADERS = gh.h
129
130 # These are headers visible as <libguile/mumble.h>.
131 modincludedir = $(includedir)/libguile
132 modinclude_HEADERS = __scm.h alist.h arbiters.h async.h backtrace.h boolean.h \
133 chars.h continuations.h coop-defs.h debug.h debug-malloc.h deprecation.h \
134 dynl.h dynwind.h environments.h eq.h error.h eval.h evalext.h \
135 extensions.h feature.h filesys.h fluids.h fports.h gc.h \
136 gdb_interface.h gdbint.h \
137 goops.h gsubr.h guardians.h hash.h hashtab.h hooks.h init.h \
138 inline.h ioext.h \
139 iselect.h keywords.h lang.h list.h load.h macros.h mallocs.h modules.h \
140 net_db.h numbers.h objects.h objprop.h options.h pairs.h ports.h posix.h \
141 regex-posix.h print.h procprop.h procs.h properties.h random.h ramap.h \
142 rdelim.h read.h root.h rw.h scmsigs.h validate.h script.h simpos.h smob.h \
143 snarf.h socket.h sort.h srcprop.h stackchk.h stacks.h stime.h strings.h \
144 strop.h strorder.h strports.h struct.h symbols.h tags.h threads.h \
145 throw.h unif.h values.h variable.h vectors.h version.h vports.h weaks.h
146
147 ## This file is generated at configure time. That is why it is DATA
148 ## and not a header -- headers are included in the distribution.
149 modinclude_DATA = scmconfig.h
150
151 bin_SCRIPTS = guile-snarf guile-doc-snarf guile-snarf-docs \
152 guile-snarf-docs-texi guile-func-name-check
153
154 EXTRA_DIST = ChangeLog-gh ChangeLog-scm ChangeLog-threads \
155 ChangeLog-1996-1999 ChangeLog-2000 cpp_signal.c \
156 cpp_errno.c cpp_err_symbols.in cpp_sig_symbols.in cpp_cnvt.awk \
157 c-tokenize.lex
158 # $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \
159 # guile-procedures.txt guile.texi
160
161 ## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
162 libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
163 @echo "Generating libpath.h..."
164 @rm -f libpath.tmp
165 @echo '/* generated by Makefile */' > libpath.tmp
166 @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
167 @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(VERSION)"'>>libpath.tmp
168 @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
169 @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp
170 @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp
171 @echo ' { "top_srcdir", "'"`cd @top_srcdir@; pwd`"'" }, \' \
172 >> libpath.tmp
173 @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp
174 @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp
175 @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp
176 @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp
177 @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp
178 @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp
179 @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp
180 @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp
181 @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp
182 @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp
183 @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp
184 @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp
185 @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp
186 @echo ' { "pkgdatadir", "$(datadir)/@PACKAGE@" }, \' >> libpath.tmp
187 @echo ' { "pkglibdir", "$(libdir)/@PACKAGE@" }, \' >> libpath.tmp
188 @echo ' { "pkgincludedir", "$(includedir)/@PACKAGE@" }, \' \
189 >> libpath.tmp
190 @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp
191 @echo ' { "libguileinterface", "@LIBGUILE_INTERFACE@" }, \' \
192 >> libpath.tmp
193 @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp
194 @echo ' { "buildstamp", "'"`date`"'" }, \' >> libpath.tmp
195 @echo '}' >> libpath.tmp
196 @mv libpath.tmp libpath.h
197
198
199 SUFFIXES = .x .doc
200 .c.x:
201 ./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \
202 || { rm $@; false; }
203 .c.doc:
204 -(test -n "${AWK+set}" || AWK="@AWK@"; ${AWK} -f ./guile-func-name-check $<)
205 (./guile-snarf-docs $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< | \
206 ./guile_filter_doc_snarfage --filter-snarfage) > $@ || { rm $@; false; }
207
208 $(DOT_X_FILES) $(EXTRA_DOT_DOC_FILES): snarf.h guile-snarf.in
209
210 $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES): snarf.h guile-snarf-docs.in guile_filter_doc_snarfage$(EXEEXT)
211
212 error.x: cpp_err_symbols.c
213 posix.x: cpp_sig_symbols.c
214 load.x: libpath.h
215
216 guile.texi: $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) guile-snarf-docs-texi.in guile
217 cat $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) | ./guile-snarf-docs-texi --manual > $@ \
218 || { rm $@; false; }
219
220 guile-procedures.texi: $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) guile-snarf-docs-texi.in guile
221 cat $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) | ./guile-snarf-docs-texi > $@ \
222 || { rm $@; false; }
223
224 guile-procedures.txt: guile-procedures.texi
225 rm -f $@
226 makeinfo --force -o $@ $< || test -f $@
227
228 c-tokenize.c: c-tokenize.lex
229 flex -t $< > $@ || { rm $@; false; }
230
231 schemelibdir = $(pkgdatadir)/$(VERSION)
232 schemelib_DATA = guile-procedures.txt
233
234 ## Add -MG to make the .x magic work with auto-dep code.
235 MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
236
237 cpp_err_symbols.c: cpp_err_symbols.in cpp_cnvt.awk
238 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \
239 cpp_err_symbols.tmp
240 mv cpp_err_symbols.tmp cpp_err_symbols.c
241
242 cpp_sig_symbols.c: cpp_sig_symbols.in cpp_cnvt.awk
243 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \
244 cpp_sig_symbols.tmp
245 mv cpp_sig_symbols.tmp cpp_sig_symbols.c
246
247 ## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX
248 ## macros defined on this platform.
249 check_signals:
250 gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \
251 | cut -f2 -d' ' | sort > cpp_sig_symbols_here
252 diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \
253 | egrep '^\+S' \
254 | cut -c2- > cpp_sig_symbols_diff
255 if test -s cpp_sig_symbols_diff ; then \
256 cat $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_diff \
257 | sort > cpp_sig_symbols_new ;\
258 echo "cpp_sig_symbols_new has the following additions:" ;\
259 cat cpp_sig_symbols_diff ;\
260 else echo "No new symbols found."; \
261 fi
262
263 ## Likewise for cpp_err_symbols.in.
264 check_errnos:
265 gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \
266 | cut -f2 -d' ' | sort > cpp_err_symbols_here
267 diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \
268 | egrep '^\+E' \
269 | cut -c2- > cpp_err_symbols_diff
270 if test -s cpp_err_symbols_diff ; then \
271 cat $(srcdir)/cpp_err_symbols.in cpp_err_symbols_diff \
272 | sort > cpp_err_symbols_new ;\
273 echo "cpp_err_symbols_new has the following additions:" ;\
274 cat cpp_err_symbols_diff ;\
275 else echo "No new symbols found."; \
276 fi
277
278 MOSTLYCLEANFILES = \
279 cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \
280 cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new
281
282 CLEANFILES = libpath.h *.x *.doc guile-procedures.txt guile-procedures.texi guile.texi
283
284 MAINTAINERCLEANFILES = c-tokenize.c