Commit | Line | Data |
---|---|---|
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 | |
22 | AUTOMAKE_OPTIONS = foreign | |
23 | ||
a0599745 MD |
24 | ## Prevent automake from adding extra -I options |
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. | |
fc7c27fd | 29 | INCLUDES = -I.. -I$(srcdir)/.. ${INCLTDL} |
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 |
549436de JB |
35 | bin_PROGRAMS = guile |
36 | ||
37 | guile_SOURCES = guile.c | |
a0e6f509 | 38 | guile_LDADD = libguile.la ${THREAD_LIBS_LOCAL} |
6165ede3 | 39 | guile_LDFLAGS = @DLPREOPEN@ |
ee2a8b9b | 40 | |
fc557f60 | 41 | libguile_la_SOURCES = \ |
f6e164d4 JB |
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 \ | |
fc557f60 MD |
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 = \ | |
f6e164d4 JB |
55 | cpp_err_symbols.c cpp_sig_symbols.c libpath.h 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 filesys.x \ | |
fc557f60 MD |
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 ramap.x read.x regex-posix.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 threads.x throw.x unif.x variable.x vectors.x \ | |
66 | version.x vports.x weaks.x debug-malloc.x | |
a3365d47 | 67 | |
9515eae6 GB |
68 | DOT_DOC_FILES = $(DOT_X_FILES:.x=.doc) |
69 | ||
70 | BUILT_SOURCES = $(DOT_X_FILES) $(DOT_DOC_FILES) | |
71 | ||
60a059e6 JB |
72 | EXTRA_libguile_la_SOURCES = _scm.h \ |
73 | alloca.c inet_aton.c memmove.c putenv.c strerror.c \ | |
bde69871 | 74 | threads.c regex-posix.c \ |
afe5177e | 75 | filesys.c posix.c net_db.c socket.c \ |
d24e2344 | 76 | ramap.c unif.c debug-malloc.c |
7bfd3b9e JB |
77 | |
78 | ## This is kind of nasty... there are ".c" files that we don't want to | |
79 | ## compile, since they are #included in threads.c. So instead we list | |
80 | ## them here. Perhaps we can deal with them normally once the merge | |
81 | ## seems to be working. | |
82 | noinst_HEADERS = coop-threads.c coop-threads.h coop.c | |
83 | ||
78bda5f3 | 84 | libguile_la_DEPENDENCIES = @LIBLOBJS@ |
6165ede3 | 85 | libguile_la_LIBADD = @LIBLOBJS@ $(LIBLTDL) |
b6fae158 | 86 | libguile_la_LDFLAGS = -version-info @LIBGUILE_MAJOR_VERSION@:@LIBGUILE_MINOR_VERSION@:@LIBGUILE_REVISION_VERSION@ -export-dynamic |
733943b9 | 87 | |
ee2a8b9b JB |
88 | # These are headers visible as <guile/mumble.h> |
89 | pkginclude_HEADERS = gh.h | |
90 | ||
733943b9 | 91 | # These are headers visible as <libguile/mumble.h>. |
5380de6b | 92 | modincludedir = $(includedir)/libguile |
fc557f60 | 93 | modinclude_HEADERS = \ |
f6e164d4 JB |
94 | __scm.h alist.h arbiters.h async.h backtrace.h boolean.h chars.h \ |
95 | continuations.h debug.h dynl.h dynwind.h eq.h error.h eval.h \ | |
96 | evalext.h feature.h filesys.h fports.h gc.h gdb_interface.h \ | |
fc557f60 | 97 | gdbint.h gsubr.h guardians.h hash.h hashtab.h hooks.h init.h \ |
7936675f | 98 | ioext.h keywords.h lang.h list.h load.h macros.h mallocs.h \ |
f6e164d4 JB |
99 | modules.h net_db.h numbers.h objects.h objprop.h options.h pairs.h \ |
100 | ports.h posix.h regex-posix.h print.h procprop.h procs.h random.h \ | |
fc557f60 MD |
101 | ramap.h read.h root.h scmsigs.h validate.h script.h simpos.h \ |
102 | smob.h socket.h sort.h srcprop.h stackchk.h stacks.h stime.h \ | |
103 | strings.h strop.h strorder.h strports.h struct.h symbols.h tag.h \ | |
104 | tags.h throw.h unif.h variable.h vectors.h version.h vports.h \ | |
105 | weaks.h snarf.h threads.h coop-defs.h fluids.h iselect.h \ | |
106 | debug-malloc.h | |
4725c298 | 107 | |
adb75a41 TT |
108 | ## This file is generated at configure time. That is why it is DATA |
109 | ## and not a header -- headers are included in the distribution. | |
733943b9 TT |
110 | modinclude_DATA = scmconfig.h |
111 | ||
0f981281 | 112 | bin_SCRIPTS = guile-snarf guile-doc-snarf guile-snarf.awk guile-func-name-check |
adb75a41 | 113 | |
a0e6f509 | 114 | check_ldadd = libguile.la ${THREAD_LIBS_LOCAL} |
ee2a8b9b JB |
115 | check_PROGRAMS = gh_test_c gh_test_repl |
116 | gh_test_c_SOURCES = gh_test_c.c | |
117 | gh_test_c_LDADD = ${check_ldadd} | |
118 | gh_test_repl_SOURCES = gh_test_repl.c | |
119 | gh_test_repl_LDADD = ${check_ldadd} | |
120 | ||
52f980e4 | 121 | check-local: |
429ae864 JB |
122 | echo '(+ 1 2 3)' | GUILE_LOAD_PATH=${top_srcdir}:.. ./gh_test_c; echo |
123 | echo '(+ 1 2 3)' | GUILE_LOAD_PATH=${top_srcdir}:.. ./gh_test_repl; echo | |
52f980e4 | 124 | |
6165ede3 | 125 | EXTRA_DIST = ChangeLog-gh ChangeLog-scm ChangeLog-threads cpp_signal.c \ |
b2728432 | 126 | cpp_errno.c cpp_err_symbols.in cpp_sig_symbols.in cpp_cnvt.awk |
733943b9 | 127 | |
fef07353 | 128 | ## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds. |
90ff3ec5 | 129 | libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status |
e151bee6 JB |
130 | @echo "Generating libpath.h..." |
131 | @rm -f libpath.tmp | |
132 | @echo '/* generated by Makefile */' > libpath.tmp | |
133 | @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp | |
134 | @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(VERSION)"'>>libpath.tmp | |
135 | @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp | |
136 | @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp | |
137 | @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp | |
138 | @echo ' { "top_srcdir", "'"`cd @top_srcdir@; pwd`"'" }, \' \ | |
139 | >> libpath.tmp | |
140 | @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp | |
141 | @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp | |
142 | @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp | |
143 | @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp | |
144 | @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp | |
145 | @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp | |
146 | @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp | |
147 | @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp | |
148 | @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp | |
149 | @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp | |
150 | @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp | |
151 | @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp | |
152 | @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp | |
153 | @echo ' { "pkgdatadir", "$(datadir)/@PACKAGE@" }, \' >> libpath.tmp | |
154 | @echo ' { "pkglibdir", "$(libdir)/@PACKAGE@" }, \' >> libpath.tmp | |
155 | @echo ' { "pkgincludedir", "$(includedir)/@PACKAGE@" }, \' \ | |
156 | >> libpath.tmp | |
b6fae158 CB |
157 | @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp |
158 | @echo ' { "libguileversion", "@LIBGUILE_VERSION@" }, \' >> libpath.tmp | |
30dda257 | 159 | @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp |
e151bee6 JB |
160 | @echo '}' >> libpath.tmp |
161 | @mv libpath.tmp libpath.h | |
733943b9 | 162 | |
3dc81fba GB |
163 | |
164 | # ./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ | |
165 | ||
166 | SUFFIXES = .x .doc | |
733943b9 | 167 | .c.x: |
b9af3d0e | 168 | PATH=.:${PATH} ./guile-doc-snarf $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \ |
95042d95 | 169 | || { rm $@; false; } |
3dc81fba | 170 | .c.doc: |
b9af3d0e | 171 | PATH=.:${PATH} ./guile-doc-snarf $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< \ |
3dc81fba | 172 | || { rm $@; false; } |
733943b9 | 173 | |
9515eae6 | 174 | guile-procedures.txt: $(DOT_DOC_FILES) |
4079f87e GB |
175 | cat *.doc > $@ |
176 | ||
177 | pkgdata_DATA = guile-procedures.txt | |
178 | ||
733943b9 TT |
179 | ## Add -MG to make the .x magic work with auto-dep code. |
180 | MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) | |
ee78fbb0 | 181 | |
a0e90145 JB |
182 | cpp_err_symbols.c: cpp_err_symbols.in |
183 | $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \ | |
593d151f JB |
184 | cpp_err_symbols.tmp |
185 | mv cpp_err_symbols.tmp cpp_err_symbols.c | |
ee78fbb0 | 186 | |
a0e90145 JB |
187 | cpp_sig_symbols.c: cpp_sig_symbols.in |
188 | $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \ | |
593d151f JB |
189 | cpp_sig_symbols.tmp |
190 | mv cpp_sig_symbols.tmp cpp_sig_symbols.c | |
67ec3667 | 191 | |
a0e90145 | 192 | ## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX |
67ec3667 GH |
193 | ## macros defined on this platform. |
194 | check_signals: | |
195 | gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \ | |
196 | | cut -f2 -d' ' | sort > cpp_sig_symbols_here | |
a0e90145 JB |
197 | diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \ |
198 | | egrep '^\+S' \ | |
67ec3667 GH |
199 | | cut -c2- > cpp_sig_symbols_diff |
200 | if test -s cpp_sig_symbols_diff ; then \ | |
a0e90145 | 201 | cat $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_diff \ |
67ec3667 GH |
202 | | sort > cpp_sig_symbols_new ;\ |
203 | echo "cpp_sig_symbols_new has the following additions:" ;\ | |
204 | cat cpp_sig_symbols_diff ;\ | |
205 | else echo "No new symbols found."; \ | |
206 | fi | |
207 | ||
a0e90145 | 208 | ## Likewise for cpp_err_symbols.in. |
67ec3667 GH |
209 | check_errnos: |
210 | gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \ | |
211 | | cut -f2 -d' ' | sort > cpp_err_symbols_here | |
a0e90145 JB |
212 | diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \ |
213 | | egrep '^\+E' \ | |
67ec3667 GH |
214 | | cut -c2- > cpp_err_symbols_diff |
215 | if test -s cpp_err_symbols_diff ; then \ | |
a0e90145 | 216 | cat $(srcdir)/cpp_err_symbols.in cpp_err_symbols_diff \ |
67ec3667 GH |
217 | | sort > cpp_err_symbols_new ;\ |
218 | echo "cpp_err_symbols_new has the following additions:" ;\ | |
219 | cat cpp_err_symbols_diff ;\ | |
220 | else echo "No new symbols found."; \ | |
221 | fi | |
222 | ||
ad6b30a0 TP |
223 | MOSTLYCLEANFILES = \ |
224 | cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \ | |
67ec3667 | 225 | cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new |
ad6b30a0 | 226 | |
56100716 | 227 | CLEANFILES = libpath.h *.x *.doc |