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