* Consolidate authorship information in AUTHORS file.
[bpt/guile.git] / libguile / Makefile.am
CommitLineData
733943b9 1## Process this file with Automake to create Makefile.in
2764bd99 2##
bde69871 3## Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
2764bd99
JB
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
733943b9
TT
21
22AUTOMAKE_OPTIONS = foreign
23
a0599745
MD
24## Prevent automake from adding extra -I options
25DEFS = @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.
fc7c27fd 29INCLUDES = -I.. -I$(srcdir)/.. ${INCLTDL}
733943b9 30
4079f87e 31ETAGS_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 34lib_LTLIBRARIES = libguile.la
549436de
JB
35bin_PROGRAMS = guile
36
37guile_SOURCES = guile.c
a0e6f509 38guile_LDADD = libguile.la ${THREAD_LIBS_LOCAL}
6165ede3 39guile_LDFLAGS = @DLPREOPEN@
ee2a8b9b 40
03416a99 41libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c \
9e6fc585 42 chars.c continuations.c debug.c dynl.c dynwind.c \
03416a99
KN
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
54DOT_X_FILES = alist.x arbiters.x async.x backtrace.x boolean.x chars.x \
9e6fc585 55 continuations.x debug.x dynl.x dynwind.x environments.x eq.x \
03416a99
KN
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 \
e9e225e5
GH
58 keywords.x lang.x list.x load.x macros.x mallocs.x modules.x \
59 numbers.x objects.x objprop.x options.x pairs.x ports.x print.x \
03416a99 60 procprop.x procs.x properties.x random.x rdelim.x read.x root.x \
e9e225e5 61 scmsigs.x script.x simpos.x smob.x sort.x srcprop.x \
03416a99
KN
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
8bee78b3 65
e9e225e5 66EXTRA_DOT_X_FILES = @EXTRA_DOT_X_FILES@
8bee78b3 67
03416a99 68DOT_DOC_FILES = alist.doc arbiters.doc async.doc backtrace.doc \
9e6fc585 69 boolean.doc chars.doc continuations.doc debug.doc dynl.doc \
03416a99
KN
70 dynwind.doc environments.doc eq.doc error.doc eval.doc evalext.doc \
71 feature.doc fluids.doc fports.doc gc.doc goops.doc gsubr.doc \
72 guardians.doc hash.doc hashtab.doc hooks.doc init.doc ioext.doc \
73 iselect.doc keywords.doc lang.doc list.doc load.doc macros.doc \
e9e225e5
GH
74 mallocs.doc modules.doc numbers.doc objects.doc objprop.doc \
75 options.doc pairs.doc ports.doc print.doc procprop.doc \
03416a99 76 procs.doc properties.doc random.doc rdelim.doc read.doc root.doc \
e9e225e5 77 scmsigs.doc script.doc simpos.doc smob.doc sort.doc \
03416a99
KN
78 srcprop.doc stackchk.doc stacks.doc stime.doc strings.doc strop.doc \
79 strorder.doc strports.doc struct.doc symbols.doc tag.doc throw.doc \
80 values.doc variable.doc vectors.doc version.doc vports.doc weaks.doc
a3365d47 81
2ce88b54 82EXTRA_DOT_DOC_FILES = @EXTRA_DOT_DOC_FILES@
9515eae6 83
5b03c15c 84BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h scmconfig.h \
2ce88b54 85 $(DOT_X_FILES) $(EXTRA_DOT_X_FILES) $(DOT_DOC_FILES)
9515eae6 86
60a059e6
JB
87EXTRA_libguile_la_SOURCES = _scm.h \
88 alloca.c inet_aton.c memmove.c putenv.c strerror.c \
bde69871 89 threads.c regex-posix.c \
afe5177e 90 filesys.c posix.c net_db.c socket.c \
d24e2344 91 ramap.c unif.c debug-malloc.c
7bfd3b9e 92
a8861fa0
MD
93## In next release, threads will be factored out of libguile.
94## Until then, the machine specific headers is a temporary kludge.
95OMIT_DEPENDENCIES = libguile.h ltdl.h \
96 axp.h hppa.h i386.h ksr.h m88k.h mips.h sparc.h vax.h
2ce88b54 97
7bfd3b9e
JB
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.
102noinst_HEADERS = coop-threads.c coop-threads.h coop.c
103
78bda5f3 104libguile_la_DEPENDENCIES = @LIBLOBJS@
6165ede3 105libguile_la_LIBADD = @LIBLOBJS@ $(LIBLTDL)
b6fae158 106libguile_la_LDFLAGS = -version-info @LIBGUILE_MAJOR_VERSION@:@LIBGUILE_MINOR_VERSION@:@LIBGUILE_REVISION_VERSION@ -export-dynamic
733943b9 107
ee2a8b9b
JB
108# These are headers visible as <guile/mumble.h>
109pkginclude_HEADERS = gh.h
110
733943b9 111# These are headers visible as <libguile/mumble.h>.
5380de6b 112modincludedir = $(includedir)/libguile
03416a99 113modinclude_HEADERS = __scm.h alist.h arbiters.h async.h backtrace.h boolean.h \
9e6fc585 114 chars.h continuations.h coop-defs.h debug.h debug-malloc.h \
03416a99
KN
115 dynl.h dynwind.h environments.h eq.h error.h eval.h evalext.h \
116 feature.h filesys.h fluids.h fports.h gc.h gdb_interface.h gdbint.h \
117 goops.h gsubr.h guardians.h hash.h hashtab.h hooks.h init.h ioext.h \
118 iselect.h keywords.h lang.h list.h load.h macros.h mallocs.h modules.h \
119 net_db.h numbers.h objects.h objprop.h options.h pairs.h ports.h posix.h \
120 regex-posix.h print.h procprop.h procs.h properties.h random.h ramap.h \
121 rdelim.h read.h root.h scmsigs.h validate.h script.h simpos.h smob.h \
122 snarf.h socket.h sort.h srcprop.h stackchk.h stacks.h stime.h strings.h \
123 strop.h strorder.h strports.h struct.h symbols.h tag.h tags.h threads.h \
124 throw.h unif.h values.h variable.h vectors.h version.h vports.h weaks.h
4725c298 125
adb75a41
TT
126## This file is generated at configure time. That is why it is DATA
127## and not a header -- headers are included in the distribution.
733943b9
TT
128modinclude_DATA = scmconfig.h
129
0f981281 130bin_SCRIPTS = guile-snarf guile-doc-snarf guile-snarf.awk guile-func-name-check
adb75a41 131
6165ede3 132EXTRA_DIST = ChangeLog-gh ChangeLog-scm ChangeLog-threads cpp_signal.c \
b2728432 133 cpp_errno.c cpp_err_symbols.in cpp_sig_symbols.in cpp_cnvt.awk
733943b9 134
fef07353 135## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
90ff3ec5 136libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
e151bee6
JB
137 @echo "Generating libpath.h..."
138 @rm -f libpath.tmp
139 @echo '/* generated by Makefile */' > libpath.tmp
140 @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
141 @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(VERSION)"'>>libpath.tmp
142 @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
143 @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp
144 @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp
145 @echo ' { "top_srcdir", "'"`cd @top_srcdir@; pwd`"'" }, \' \
146 >> libpath.tmp
147 @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp
148 @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp
149 @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp
150 @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp
151 @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp
152 @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp
153 @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp
154 @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp
155 @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp
156 @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp
157 @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp
158 @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp
159 @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp
160 @echo ' { "pkgdatadir", "$(datadir)/@PACKAGE@" }, \' >> libpath.tmp
161 @echo ' { "pkglibdir", "$(libdir)/@PACKAGE@" }, \' >> libpath.tmp
162 @echo ' { "pkgincludedir", "$(includedir)/@PACKAGE@" }, \' \
163 >> libpath.tmp
b6fae158
CB
164 @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp
165 @echo ' { "libguileversion", "@LIBGUILE_VERSION@" }, \' >> libpath.tmp
30dda257 166 @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp
e151bee6
JB
167 @echo '}' >> libpath.tmp
168 @mv libpath.tmp libpath.h
733943b9 169
3dc81fba
GB
170
171# ./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@
172
173SUFFIXES = .x .doc
733943b9 174.c.x:
fc40e1fd 175 ./guile-doc-snarf $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \
95042d95 176 || { rm $@; false; }
66418d34 177.x.doc:
fc40e1fd 178 ./guile-doc-snarf $(srcdir)/$*.c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(srcdir)/$*.c > /dev/null \
3dc81fba 179 || { rm $@; false; }
733943b9 180
66418d34
KN
181*.x: snarf.h guile-doc-snarf.in
182*.doc: guile-snarf.awk.in
183
faf6a29b
MV
184error.x: cpp_err_symbols.c
185posix.x: cpp_sig_symbols.c
186load.x: libpath.h
187
9d29e990
NJ
188guile.texi: $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES)
189 echo "@paragraphindent 0" > $@
190 cat *.doc >> $@
191
192guile-procedures.txt: guile.texi
193 rm -f $@
194 makeinfo --force -o $@ $< || test -f $@
4079f87e 195
8dc9439f
MV
196schemelibdir = $(pkgdatadir)/$(VERSION)
197schemelib_DATA = guile-procedures.txt
4079f87e 198
733943b9
TT
199## Add -MG to make the .x magic work with auto-dep code.
200MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
ee78fbb0 201
a0e90145
JB
202cpp_err_symbols.c: cpp_err_symbols.in
203 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \
593d151f
JB
204 cpp_err_symbols.tmp
205 mv cpp_err_symbols.tmp cpp_err_symbols.c
ee78fbb0 206
a0e90145
JB
207cpp_sig_symbols.c: cpp_sig_symbols.in
208 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \
593d151f
JB
209 cpp_sig_symbols.tmp
210 mv cpp_sig_symbols.tmp cpp_sig_symbols.c
67ec3667 211
a0e90145 212## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX
67ec3667
GH
213## macros defined on this platform.
214check_signals:
215 gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \
216 | cut -f2 -d' ' | sort > cpp_sig_symbols_here
a0e90145
JB
217 diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \
218 | egrep '^\+S' \
67ec3667
GH
219 | cut -c2- > cpp_sig_symbols_diff
220 if test -s cpp_sig_symbols_diff ; then \
a0e90145 221 cat $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_diff \
67ec3667
GH
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
a0e90145 228## Likewise for cpp_err_symbols.in.
67ec3667
GH
229check_errnos:
230 gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \
231 | cut -f2 -d' ' | sort > cpp_err_symbols_here
a0e90145
JB
232 diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \
233 | egrep '^\+E' \
67ec3667
GH
234 | cut -c2- > cpp_err_symbols_diff
235 if test -s cpp_err_symbols_diff ; then \
a0e90145 236 cat $(srcdir)/cpp_err_symbols.in cpp_err_symbols_diff \
67ec3667
GH
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
ad6b30a0
TP
243MOSTLYCLEANFILES = \
244 cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \
67ec3667 245 cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new
ad6b30a0 246
56100716 247CLEANFILES = libpath.h *.x *.doc