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