*** empty log message ***
[bpt/guile.git] / libguile / Makefile.am
CommitLineData
733943b9
TT
1## Process this file with Automake to create Makefile.in
2
3AUTOMAKE_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.
8INCLUDES = -I.. -I$(srcdir)/..
9
1bb9f4db
MV
10lib_PROGRAMS = libguile.la
11libguile_la_SOURCES = alist.c append.c appinit.c arbiters.c async.c \
9dcf6a02 12boolean.c chars.c continuations.c dynl.c dynwind.c eq.c \
370312ae 13error.c eval.c extchrs.c feature.c filesys.c fports.c gc.c \
9dcf6a02 14gdbint.c genio.c gsubr.c hash.c hashtab.c init.c ioext.c \
370312ae
GH
15kw.c list.c load.c mallocs.c markers.c mbstrings.c net_db.c \
16numbers.c objprop.c \
733943b9 17options.c pairs.c ports.c posix.c print.c procprop.c procs.c ramap.c \
9dcf6a02
JB
18read.c root.c scmsigs.c sequences.c simpos.c smob.c socket.c \
19stackchk.c stime.c strings.c strop.c strorder.c \
733943b9
TT
20strports.c struct.c symbols.c tag.c throw.c unif.c variable.c \
21vectors.c version.c vports.c weaks.c _scm.h
78bda5f3 22EXTRA_libguile_la_SOURCES = backtrace.c stacks.c debug.c srcprop.c \
19468eff 23strerror.c inet_aton.c putenv.c
78bda5f3 24libguile_la_DEPENDENCIES = @LIBLOBJS@
9dcf6a02 25libguile_la_LDADD = @LIBLOBJS@
1bb9f4db 26libguile_la_LDFLAGS = -version-info 0:0 -rpath $(libdir)
733943b9
TT
27
28include_HEADERS = libguile.h
29
30# These are headers visible as <libguile/mumble.h>.
31modincludedir = $(includedir)/@module@
32modinclude_HEADERS = __scm.h alist.h append.h arbiters.h async.h \
496f55cd 33backtrace.h boolean.h chars.h continuations.h debug.h dynl.h dynwind.h eq.h \
370312ae 34error.h eval.h extchrs.h feature.h filesys.h fports.h gc.h \
733943b9 35gdb_interface.h gdbint.h genio.h gsubr.h hash.h hashtab.h init.h ioext.h \
370312ae
GH
36kw.h list.h load.h mallocs.h markers.h mbstrings.h net_db.h \
37numbers.h objprop.h \
733943b9
TT
38options.h pairs.h ports.h posix.h print.h procprop.h procs.h ramap.h read.h \
39root.h scmhob.h scmsigs.h sequences.h simpos.h smob.h socket.h srcprop.h \
40stackchk.h stacks.h stime.h strings.h strop.h strorder.h strports.h struct.h \
41symbols.h tag.h tags.h throw.h unif.h variable.h vectors.h version.h \
42vports.h weaks.h snarf.h
43
adb75a41
TT
44## This file is generated at configure time. That is why it is DATA
45## and not a header -- headers are included in the distribution.
733943b9
TT
46modinclude_DATA = scmconfig.h
47
adb75a41
TT
48bin_SCRIPTS = guile-snarf
49
496f55cd 50EXTRA_DIST = gscm.c gscm.h ChangeLog-scm dynl-dl.c dynl-dld.c dynl-shl.c \
ee78fbb0 51dynl-vms.c DYNAMIC-LINKING PLUGIN/REQ PLUGIN/guile.config \
a0e90145
JB
52PLUGIN/guile.libs.in cpp_signal.c cpp_errno.c cpp_err_symbols.in \
53cpp_sig_symbols.in cpp_cnvt.awk
733943b9
TT
54
55## FIXME: shouldn't directly generate file; instead generate temp file
56## and "mv". Consider using timestamp file as well, to avoid
57## unnecessary rebuilds.
58libpath.h: Makefile
59 echo '/* generated by Makefile */' > libpath.h
a73b8985
JB
60 echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.h
61 echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(VERSION)"' >> libpath.h
62 echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.h
733943b9
TT
63
64SUFFIXES = .x
65.c.x:
adb75a41 66 ./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@
733943b9
TT
67
68## Add -MG to make the .x magic work with auto-dep code.
69MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
ee78fbb0 70
a0e90145
JB
71cpp_err_symbols.c: cpp_err_symbols.in
72 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \
67ec3667 73 cpp_err_symbols.c
ee78fbb0 74
a0e90145
JB
75cpp_sig_symbols.c: cpp_sig_symbols.in
76 $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \
67ec3667
GH
77 cpp_sig_symbols.c
78
a0e90145 79## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX
67ec3667
GH
80## macros defined on this platform.
81check_signals:
82 gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \
83 | cut -f2 -d' ' | sort > cpp_sig_symbols_here
a0e90145
JB
84 diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \
85 | egrep '^\+S' \
67ec3667
GH
86 | cut -c2- > cpp_sig_symbols_diff
87 if test -s cpp_sig_symbols_diff ; then \
a0e90145 88 cat $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_diff \
67ec3667
GH
89 | sort > cpp_sig_symbols_new ;\
90 echo "cpp_sig_symbols_new has the following additions:" ;\
91 cat cpp_sig_symbols_diff ;\
92 else echo "No new symbols found."; \
93 fi
94
a0e90145 95## Likewise for cpp_err_symbols.in.
67ec3667
GH
96check_errnos:
97 gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \
98 | cut -f2 -d' ' | sort > cpp_err_symbols_here
a0e90145
JB
99 diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \
100 | egrep '^\+E' \
67ec3667
GH
101 | cut -c2- > cpp_err_symbols_diff
102 if test -s cpp_err_symbols_diff ; then \
a0e90145 103 cat $(srcdir)/cpp_err_symbols.in cpp_err_symbols_diff \
67ec3667
GH
104 | sort > cpp_err_symbols_new ;\
105 echo "cpp_err_symbols_new has the following additions:" ;\
106 cat cpp_err_symbols_diff ;\
107 else echo "No new symbols found."; \
108 fi
109
110CLEANFILES=cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \
111 cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new