Remove dump facilities.
[bpt/guile.git] / libguile / Makefile.am
1 ## Process this file with Automake to create Makefile.in
2 ##
3 ## Copyright (C) 1998, 1999, 2000 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 = foreign
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
36
37 guile_SOURCES = guile.c
38 guile_LDADD = libguile.la ${THREAD_LIBS_LOCAL}
39 guile_LDFLAGS = @DLPREOPEN@
40
41 libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c \
42 chars.c continuations.c debug.c dynl.c dynwind.c \
43 environments.c eq.c error.c eval.c evalext.c feature.c fluids.c fports.c \
44 gc.c gc_os_dep.c gdbint.c gh_data.c gh_eval.c gh_funcs.c gh_init.c \
45 gh_io.c gh_list.c gh_predicates.c goops.c gsubr.c guardians.c hash.c \
46 hashtab.c hooks.c init.c ioext.c iselect.c keywords.c lang.c list.c \
47 load.c macros.c mallocs.c modules.c numbers.c objects.c objprop.c \
48 options.c pairs.c ports.c print.c procprop.c procs.c properties.c \
49 random.c rdelim.c read.c root.c scmsigs.c script.c simpos.c smob.c \
50 sort.c srcprop.c stackchk.c stacks.c stime.c strings.c strop.c \
51 strorder.c strports.c struct.c symbols.c tag.c throw.c values.c \
52 variable.c vectors.c version.c vports.c weaks.c
53
54 DOT_X_FILES = alist.x arbiters.x async.x backtrace.x boolean.x chars.x \
55 continuations.x debug.x dynl.x dynwind.x environments.x eq.x \
56 error.x eval.x evalext.x feature.x fluids.x fports.x gc.x goops.x \
57 gsubr.x guardians.x hash.x hashtab.x hooks.x init.x ioext.x iselect.x \
58 keywords.x lang.x list.x load.x macros.x mallocs.x modules.x net_db.x \
59 numbers.x objects.x objprop.x options.x pairs.x ports.x posix.x print.x \
60 procprop.x procs.x properties.x random.x rdelim.x read.x root.x \
61 scmsigs.x script.x simpos.x smob.x socket.x sort.x srcprop.x \
62 stackchk.x stacks.x stime.x strings.x strop.x strorder.x strports.x \
63 struct.x symbols.x tag.x throw.x values.x variable.x vectors.x \
64 version.x vports.x weaks.x
65
66 EXTRA_DOT_X_FILES = debug-malloc.x filesys.x net_db.x posix.x ramap.x \
67 regex-posix.x socket.x threads.x unif.x
68
69 DOT_DOC_FILES = alist.doc arbiters.doc async.doc backtrace.doc \
70 boolean.doc chars.doc continuations.doc debug.doc dynl.doc \
71 dynwind.doc environments.doc eq.doc error.doc eval.doc evalext.doc \
72 feature.doc fluids.doc fports.doc gc.doc goops.doc gsubr.doc \
73 guardians.doc hash.doc hashtab.doc hooks.doc init.doc ioext.doc \
74 iselect.doc keywords.doc lang.doc list.doc load.doc macros.doc \
75 mallocs.doc modules.doc net_db.doc numbers.doc objects.doc objprop.doc \
76 options.doc pairs.doc ports.doc posix.doc print.doc procprop.doc \
77 procs.doc properties.doc random.doc rdelim.doc read.doc root.doc \
78 scmsigs.doc script.doc simpos.doc smob.doc socket.doc sort.doc \
79 srcprop.doc stackchk.doc stacks.doc stime.doc strings.doc strop.doc \
80 strorder.doc strports.doc struct.doc symbols.doc tag.doc throw.doc \
81 values.doc variable.doc vectors.doc version.doc vports.doc weaks.doc
82
83 EXTRA_DOT_DOC_FILES = @EXTRA_DOT_DOC_FILES@
84
85 BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h scmconfig.h \
86 $(DOT_X_FILES) $(EXTRA_DOT_X_FILES) $(DOT_DOC_FILES)
87
88 EXTRA_libguile_la_SOURCES = _scm.h \
89 alloca.c inet_aton.c memmove.c putenv.c strerror.c \
90 threads.c regex-posix.c \
91 filesys.c posix.c net_db.c socket.c \
92 ramap.c unif.c debug-malloc.c
93
94 ## In next release, threads will be factored out of libguile.
95 ## Until then, the machine specific headers is a temporary kludge.
96 OMIT_DEPENDENCIES = libguile.h ltdl.h \
97 axp.h hppa.h i386.h ksr.h m88k.h mips.h sparc.h vax.h
98
99 ## This is kind of nasty... there are ".c" files that we don't want to
100 ## compile, since they are #included in threads.c. So instead we list
101 ## them here. Perhaps we can deal with them normally once the merge
102 ## seems to be working.
103 noinst_HEADERS = coop-threads.c coop-threads.h coop.c
104
105 libguile_la_DEPENDENCIES = @LIBLOBJS@
106 libguile_la_LIBADD = @LIBLOBJS@ $(LIBLTDL)
107 libguile_la_LDFLAGS = -version-info @LIBGUILE_MAJOR_VERSION@:@LIBGUILE_MINOR_VERSION@:@LIBGUILE_REVISION_VERSION@ -export-dynamic
108
109 # These are headers visible as <guile/mumble.h>
110 pkginclude_HEADERS = gh.h
111
112 # These are headers visible as <libguile/mumble.h>.
113 modincludedir = $(includedir)/libguile
114 modinclude_HEADERS = __scm.h alist.h arbiters.h async.h backtrace.h boolean.h \
115 chars.h continuations.h coop-defs.h debug.h debug-malloc.h \
116 dynl.h dynwind.h environments.h eq.h error.h eval.h evalext.h \
117 feature.h filesys.h fluids.h fports.h gc.h gdb_interface.h gdbint.h \
118 goops.h gsubr.h guardians.h hash.h hashtab.h hooks.h init.h ioext.h \
119 iselect.h keywords.h lang.h list.h load.h macros.h mallocs.h modules.h \
120 net_db.h numbers.h objects.h objprop.h options.h pairs.h ports.h posix.h \
121 regex-posix.h print.h procprop.h procs.h properties.h random.h ramap.h \
122 rdelim.h read.h root.h scmsigs.h validate.h script.h simpos.h smob.h \
123 snarf.h socket.h sort.h srcprop.h stackchk.h stacks.h stime.h strings.h \
124 strop.h strorder.h strports.h struct.h symbols.h tag.h tags.h threads.h \
125 throw.h unif.h values.h variable.h vectors.h version.h vports.h weaks.h
126
127 ## This file is generated at configure time. That is why it is DATA
128 ## and not a header -- headers are included in the distribution.
129 modinclude_DATA = scmconfig.h
130
131 bin_SCRIPTS = guile-snarf guile-doc-snarf guile-snarf.awk guile-func-name-check
132
133 EXTRA_DIST = ChangeLog-gh ChangeLog-scm ChangeLog-threads cpp_signal.c \
134 cpp_errno.c cpp_err_symbols.in cpp_sig_symbols.in cpp_cnvt.awk
135
136 ## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
137 libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
138 @echo "Generating libpath.h..."
139 @rm -f libpath.tmp
140 @echo '/* generated by Makefile */' > libpath.tmp
141 @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
142 @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(VERSION)"'>>libpath.tmp
143 @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
144 @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp
145 @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp
146 @echo ' { "top_srcdir", "'"`cd @top_srcdir@; pwd`"'" }, \' \
147 >> libpath.tmp
148 @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp
149 @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp
150 @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp
151 @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp
152 @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp
153 @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp
154 @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp
155 @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp
156 @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp
157 @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp
158 @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp
159 @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp
160 @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp
161 @echo ' { "pkgdatadir", "$(datadir)/@PACKAGE@" }, \' >> libpath.tmp
162 @echo ' { "pkglibdir", "$(libdir)/@PACKAGE@" }, \' >> libpath.tmp
163 @echo ' { "pkgincludedir", "$(includedir)/@PACKAGE@" }, \' \
164 >> libpath.tmp
165 @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp
166 @echo ' { "libguileversion", "@LIBGUILE_VERSION@" }, \' >> libpath.tmp
167 @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp
168 @echo '}' >> libpath.tmp
169 @mv libpath.tmp libpath.h
170
171
172 # ./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@
173
174 SUFFIXES = .x .doc
175 .c.x:
176 ./guile-doc-snarf $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \
177 || { rm $@; false; }
178 .x.doc:
179 ./guile-doc-snarf $(srcdir)/$*.c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(srcdir)/$*.c > /dev/null \
180 || { rm $@; false; }
181
182 error.x: cpp_err_symbols.c
183 posix.x: cpp_sig_symbols.c
184 load.x: libpath.h
185
186 guile.texi: $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES)
187 echo "@paragraphindent 0" > $@
188 cat *.doc >> $@
189
190 guile-procedures.txt: guile.texi
191 rm -f $@
192 makeinfo --force -o $@ $< || test -f $@
193
194 schemelibdir = $(pkgdatadir)/$(VERSION)
195 schemelib_DATA = guile-procedures.txt
196
197 ## Add -MG to make the .x magic work with auto-dep code.
198 MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
199
200 cpp_err_symbols.c: cpp_err_symbols.in
201 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \
202 cpp_err_symbols.tmp
203 mv cpp_err_symbols.tmp cpp_err_symbols.c
204
205 cpp_sig_symbols.c: cpp_sig_symbols.in
206 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \
207 cpp_sig_symbols.tmp
208 mv cpp_sig_symbols.tmp cpp_sig_symbols.c
209
210 ## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX
211 ## macros defined on this platform.
212 check_signals:
213 gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \
214 | cut -f2 -d' ' | sort > cpp_sig_symbols_here
215 diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \
216 | egrep '^\+S' \
217 | cut -c2- > cpp_sig_symbols_diff
218 if test -s cpp_sig_symbols_diff ; then \
219 cat $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_diff \
220 | sort > cpp_sig_symbols_new ;\
221 echo "cpp_sig_symbols_new has the following additions:" ;\
222 cat cpp_sig_symbols_diff ;\
223 else echo "No new symbols found."; \
224 fi
225
226 ## Likewise for cpp_err_symbols.in.
227 check_errnos:
228 gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \
229 | cut -f2 -d' ' | sort > cpp_err_symbols_here
230 diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \
231 | egrep '^\+E' \
232 | cut -c2- > cpp_err_symbols_diff
233 if test -s cpp_err_symbols_diff ; then \
234 cat $(srcdir)/cpp_err_symbols.in cpp_err_symbols_diff \
235 | sort > cpp_err_symbols_new ;\
236 echo "cpp_err_symbols_new has the following additions:" ;\
237 cat cpp_err_symbols_diff ;\
238 else echo "No new symbols found."; \
239 fi
240
241 MOSTLYCLEANFILES = \
242 cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \
243 cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new
244
245 CLEANFILES = libpath.h *.x *.doc