Commit | Line | Data |
---|---|---|
733943b9 TT |
1 | ## Process this file with Automake to create Makefile.in |
2 | ||
3 | AUTOMAKE_OPTIONS = foreign | |
4 | ||
5 | ## Check for headers in $(srcdir)/.., so that #include | |
6 | ## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're | |
7 | ## building. | |
8 | INCLUDES = -I.. -I$(srcdir)/.. | |
9 | ||
fef07353 JB |
10 | ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(PROC\|PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' |
11 | ||
e13d8dc0 | 12 | lib_LTLIBRARIES = libguile.la |
549436de JB |
13 | bin_PROGRAMS = guile |
14 | ||
15 | guile_SOURCES = guile.c | |
16 | guile_LDADD = libguile.la ${THREAD_LIBS} | |
ee2a8b9b JB |
17 | |
18 | libguile_la_SOURCES = \ | |
6ddf5b7d | 19 | alist.c appinit.c arbiters.c async.c boolean.c chars.c \ |
a2d4941f JB |
20 | continuations.c dynl.c dynwind.c eq.c error.c eval.c feature.c \ |
21 | filesys.c fports.c gc.c gdbint.c genio.c gh_data.c gh_eval.c \ | |
22 | gh_funcs.c gh_init.c gh_io.c gh_list.c gh_predicates.c gsubr.c \ | |
23 | hash.c hashtab.c init.c ioext.c kw.c list.c load.c mallocs.c \ | |
24 | markers.c net_db.c numbers.c objects.c objprop.c options.c pairs.c \ | |
25 | ports.c posix.c print.c procprop.c procs.c ramap.c read.c \ | |
26 | readline.c root.c scmsigs.c script.c simpos.c smob.c socket.c \ | |
27 | stackchk.c stime.c strings.c strop.c strorder.c strports.c \ | |
28 | struct.c symbols.c tag.c throw.c unif.c variable.c vectors.c \ | |
29 | version.c vports.c weaks.c fluids.c | |
549436de | 30 | |
a3365d47 | 31 | BUILT_SOURCES = \ |
90ff3ec5 | 32 | cpp_err_symbols.c cpp_sig_symbols.c libpath.h versiondat.h \ |
a3365d47 MD |
33 | alist.x appinit.x arbiters.x async.x boolean.x chars.x \ |
34 | continuations.x dynl.x dynwind.x eq.x error.x eval.x feature.x \ | |
35 | filesys.x fports.x gc.x gdbint.x genio.x gh_data.x gh_eval.x \ | |
36 | gh_funcs.x gh_init.x gh_io.x gh_list.x gh_predicates.x gsubr.x \ | |
37 | hash.x hashtab.x init.x ioext.x kw.x list.x load.x mallocs.x \ | |
38 | markers.x net_db.x numbers.x objects.x objprop.x options.x pairs.x \ | |
39 | ports.x posix.x print.x procprop.x procs.x ramap.x read.x \ | |
40 | readline.x root.x scmsigs.x script.x simpos.x smob.x socket.x \ | |
41 | stackchk.x stime.x strings.x strop.x strorder.x strports.x \ | |
42 | struct.x symbols.x tag.x throw.x unif.x variable.x vectors.x \ | |
43 | version.x vports.x weaks.x fluids.x \ | |
44 | backtrace.x stacks.x debug.x srcprop.x \ | |
45 | threads.x \ | |
46 | regex-posix.x iselect.x | |
47 | ||
ee2a8b9b JB |
48 | EXTRA_libguile_la_SOURCES = _scm.h \ |
49 | backtrace.c stacks.c debug.c srcprop.c \ | |
7bfd3b9e | 50 | strerror.c inet_aton.c putenv.c \ |
f255378e | 51 | threads.c alloca.c \ |
44e8413c | 52 | regex-posix.c iselect.c |
7bfd3b9e JB |
53 | |
54 | ## This is kind of nasty... there are ".c" files that we don't want to | |
55 | ## compile, since they are #included in threads.c. So instead we list | |
56 | ## them here. Perhaps we can deal with them normally once the merge | |
57 | ## seems to be working. | |
58 | noinst_HEADERS = coop-threads.c coop-threads.h coop.c | |
59 | ||
78bda5f3 | 60 | libguile_la_DEPENDENCIES = @LIBLOBJS@ |
4a5fa91c | 61 | libguile_la_LIBADD = @LIBLOBJS@ |
104d4533 | 62 | libguile_la_LDFLAGS = -version-info 3:0 -export-dynamic |
733943b9 TT |
63 | |
64 | include_HEADERS = libguile.h | |
65 | ||
ee2a8b9b JB |
66 | # These are headers visible as <guile/mumble.h> |
67 | pkginclude_HEADERS = gh.h | |
68 | ||
733943b9 | 69 | # These are headers visible as <libguile/mumble.h>. |
5380de6b | 70 | modincludedir = $(includedir)/libguile |
99dc0f92 JB |
71 | modinclude_HEADERS = \ |
72 | __scm.h alist.h arbiters.h async.h backtrace.h boolean.h chars.h \ | |
73 | continuations.h debug.h dynl.h dynwind.h eq.h error.h eval.h \ | |
74 | feature.h filesys.h fports.h gc.h gdb_interface.h gdbint.h genio.h \ | |
75 | gsubr.h hash.h hashtab.h init.h ioext.h kw.h list.h load.h \ | |
76 | mallocs.h markers.h net_db.h numbers.h objects.h objprop.h \ | |
77 | options.h pairs.h ports.h posix.h regex-posix.h print.h procprop.h \ | |
78 | procs.h ramap.h read.h readline.h root.h scmsigs.h script.h \ | |
79 | simpos.h smob.h socket.h srcprop.h stackchk.h stacks.h stime.h \ | |
80 | strings.h strop.h strorder.h strports.h struct.h symbols.h tag.h \ | |
81 | tags.h throw.h unif.h variable.h vectors.h version.h vports.h \ | |
44e8413c | 82 | weaks.h snarf.h threads.h coop-defs.h fluids.h iselect.h |
733943b9 | 83 | |
adb75a41 TT |
84 | ## This file is generated at configure time. That is why it is DATA |
85 | ## and not a header -- headers are included in the distribution. | |
733943b9 TT |
86 | modinclude_DATA = scmconfig.h |
87 | ||
adb75a41 TT |
88 | bin_SCRIPTS = guile-snarf |
89 | ||
ee2a8b9b JB |
90 | THREAD_LIBS = @THREAD_LIBS@ |
91 | check_ldadd = libguile.la ${THREAD_LIBS} | |
92 | check_PROGRAMS = gh_test_c gh_test_repl | |
93 | gh_test_c_SOURCES = gh_test_c.c | |
94 | gh_test_c_LDADD = ${check_ldadd} | |
95 | gh_test_repl_SOURCES = gh_test_repl.c | |
96 | gh_test_repl_LDADD = ${check_ldadd} | |
97 | ||
52f980e4 JB |
98 | check-local: |
99 | echo '(+ 1 2 3)' | ./gh_test_c; echo | |
100 | echo '(+ 1 2 3)' | ./gh_test_repl; echo | |
101 | ||
1773993b JB |
102 | EXTRA_DIST = ChangeLog-gh ChangeLog-scm ChangeLog-threads dynl-dl.c \ |
103 | dynl-dld.c dynl-shl.c dynl-vms.c DYNAMIC-LINKING cpp_signal.c cpp_errno.c \ | |
104 | cpp_err_symbols.in cpp_sig_symbols.in cpp_cnvt.awk coop-threads.h.cygnus \ | |
105 | coop-threads.c.cygnus mit-pthreads.h mit-pthreads.c fsu-pthreads.h | |
733943b9 | 106 | |
fef07353 | 107 | ## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds. |
90ff3ec5 | 108 | libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status |
e151bee6 JB |
109 | @echo "Generating libpath.h..." |
110 | @rm -f libpath.tmp | |
111 | @echo '/* generated by Makefile */' > libpath.tmp | |
112 | @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp | |
113 | @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(VERSION)"'>>libpath.tmp | |
114 | @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp | |
115 | @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp | |
116 | @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp | |
117 | @echo ' { "top_srcdir", "'"`cd @top_srcdir@; pwd`"'" }, \' \ | |
118 | >> libpath.tmp | |
119 | @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp | |
120 | @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp | |
121 | @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp | |
122 | @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp | |
123 | @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp | |
124 | @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp | |
125 | @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp | |
126 | @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp | |
127 | @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp | |
128 | @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp | |
129 | @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp | |
130 | @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp | |
131 | @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp | |
132 | @echo ' { "pkgdatadir", "$(datadir)/@PACKAGE@" }, \' >> libpath.tmp | |
133 | @echo ' { "pkglibdir", "$(libdir)/@PACKAGE@" }, \' >> libpath.tmp | |
134 | @echo ' { "pkgincludedir", "$(includedir)/@PACKAGE@" }, \' \ | |
135 | >> libpath.tmp | |
90ff3ec5 | 136 | @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp |
e151bee6 JB |
137 | @echo '}' >> libpath.tmp |
138 | @mv libpath.tmp libpath.h | |
733943b9 | 139 | |
fef07353 | 140 | ## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds. |
90ff3ec5 | 141 | versiondat.h: $(srcdir)/Makefile.in $(top_builddir)/config.status |
e151bee6 JB |
142 | @echo "Generating versiondat.h..." |
143 | @rm -f versiondat.tmp | |
144 | @echo '/* generated by Makefile */' > versiondat.tmp | |
145 | @echo '#define GUILE_VERSION "$(GUILE_VERSION)"' >> versiondat.tmp | |
146 | @echo '#define GUILE_MAJOR_VERSION "$(GUILE_MAJOR_VERSION)"' \ | |
fef07353 | 147 | >> versiondat.tmp |
e151bee6 | 148 | @echo '#define GUILE_MINOR_VERSION "$(GUILE_MINOR_VERSION)"' \ |
fef07353 | 149 | >> versiondat.tmp |
e151bee6 JB |
150 | @echo '#define GUILE_STAMP "$(GUILE_STAMP)"' >> versiondat.tmp |
151 | @mv versiondat.tmp versiondat.h | |
fef07353 | 152 | |
733943b9 TT |
153 | SUFFIXES = .x |
154 | .c.x: | |
adb75a41 | 155 | ./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ |
733943b9 TT |
156 | |
157 | ## Add -MG to make the .x magic work with auto-dep code. | |
158 | MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) | |
ee78fbb0 | 159 | |
a0e90145 JB |
160 | cpp_err_symbols.c: cpp_err_symbols.in |
161 | $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \ | |
593d151f JB |
162 | cpp_err_symbols.tmp |
163 | mv cpp_err_symbols.tmp cpp_err_symbols.c | |
ee78fbb0 | 164 | |
a0e90145 JB |
165 | cpp_sig_symbols.c: cpp_sig_symbols.in |
166 | $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \ | |
593d151f JB |
167 | cpp_sig_symbols.tmp |
168 | mv cpp_sig_symbols.tmp cpp_sig_symbols.c | |
67ec3667 | 169 | |
a0e90145 | 170 | ## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX |
67ec3667 GH |
171 | ## macros defined on this platform. |
172 | check_signals: | |
173 | gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \ | |
174 | | cut -f2 -d' ' | sort > cpp_sig_symbols_here | |
a0e90145 JB |
175 | diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \ |
176 | | egrep '^\+S' \ | |
67ec3667 GH |
177 | | cut -c2- > cpp_sig_symbols_diff |
178 | if test -s cpp_sig_symbols_diff ; then \ | |
a0e90145 | 179 | cat $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_diff \ |
67ec3667 GH |
180 | | sort > cpp_sig_symbols_new ;\ |
181 | echo "cpp_sig_symbols_new has the following additions:" ;\ | |
182 | cat cpp_sig_symbols_diff ;\ | |
183 | else echo "No new symbols found."; \ | |
184 | fi | |
185 | ||
a0e90145 | 186 | ## Likewise for cpp_err_symbols.in. |
67ec3667 GH |
187 | check_errnos: |
188 | gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \ | |
189 | | cut -f2 -d' ' | sort > cpp_err_symbols_here | |
a0e90145 JB |
190 | diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \ |
191 | | egrep '^\+E' \ | |
67ec3667 GH |
192 | | cut -c2- > cpp_err_symbols_diff |
193 | if test -s cpp_err_symbols_diff ; then \ | |
a0e90145 | 194 | cat $(srcdir)/cpp_err_symbols.in cpp_err_symbols_diff \ |
67ec3667 GH |
195 | | sort > cpp_err_symbols_new ;\ |
196 | echo "cpp_err_symbols_new has the following additions:" ;\ | |
197 | cat cpp_err_symbols_diff ;\ | |
198 | else echo "No new symbols found."; \ | |
199 | fi | |
200 | ||
ad6b30a0 TP |
201 | MOSTLYCLEANFILES = \ |
202 | cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \ | |
67ec3667 | 203 | cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new |
ad6b30a0 TP |
204 | |
205 | CLEANFILES = versiondat.h libpath.h | |
206 | ||
207 | DISTCLEANFILES = *.x | |
208 |