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 | ||
1bb9f4db MV |
10 | lib_PROGRAMS = libguile.la |
11 | libguile_la_SOURCES = alist.c append.c appinit.c arbiters.c async.c \ | |
9dcf6a02 | 12 | boolean.c chars.c continuations.c dynl.c dynwind.c eq.c \ |
370312ae | 13 | error.c eval.c extchrs.c feature.c filesys.c fports.c gc.c \ |
9dcf6a02 | 14 | gdbint.c genio.c gsubr.c hash.c hashtab.c init.c ioext.c \ |
370312ae GH |
15 | kw.c list.c load.c mallocs.c markers.c mbstrings.c net_db.c \ |
16 | numbers.c objprop.c \ | |
733943b9 | 17 | options.c pairs.c ports.c posix.c print.c procprop.c procs.c ramap.c \ |
9dcf6a02 JB |
18 | read.c root.c scmsigs.c sequences.c simpos.c smob.c socket.c \ |
19 | stackchk.c stime.c strings.c strop.c strorder.c \ | |
733943b9 TT |
20 | strports.c struct.c symbols.c tag.c throw.c unif.c variable.c \ |
21 | vectors.c version.c vports.c weaks.c _scm.h | |
78bda5f3 | 22 | EXTRA_libguile_la_SOURCES = backtrace.c stacks.c debug.c srcprop.c \ |
19468eff | 23 | strerror.c inet_aton.c putenv.c |
78bda5f3 | 24 | libguile_la_DEPENDENCIES = @LIBLOBJS@ |
9dcf6a02 | 25 | libguile_la_LDADD = @LIBLOBJS@ |
1bb9f4db | 26 | libguile_la_LDFLAGS = -version-info 0:0 -rpath $(libdir) |
733943b9 TT |
27 | |
28 | include_HEADERS = libguile.h | |
29 | ||
30 | # These are headers visible as <libguile/mumble.h>. | |
31 | modincludedir = $(includedir)/@module@ | |
32 | modinclude_HEADERS = __scm.h alist.h append.h arbiters.h async.h \ | |
496f55cd | 33 | backtrace.h boolean.h chars.h continuations.h debug.h dynl.h dynwind.h eq.h \ |
370312ae | 34 | error.h eval.h extchrs.h feature.h filesys.h fports.h gc.h \ |
733943b9 | 35 | gdb_interface.h gdbint.h genio.h gsubr.h hash.h hashtab.h init.h ioext.h \ |
370312ae GH |
36 | kw.h list.h load.h mallocs.h markers.h mbstrings.h net_db.h \ |
37 | numbers.h objprop.h \ | |
733943b9 TT |
38 | options.h pairs.h ports.h posix.h print.h procprop.h procs.h ramap.h read.h \ |
39 | root.h scmhob.h scmsigs.h sequences.h simpos.h smob.h socket.h srcprop.h \ | |
40 | stackchk.h stacks.h stime.h strings.h strop.h strorder.h strports.h struct.h \ | |
41 | symbols.h tag.h tags.h throw.h unif.h variable.h vectors.h version.h \ | |
42 | vports.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 |
46 | modinclude_DATA = scmconfig.h |
47 | ||
adb75a41 TT |
48 | bin_SCRIPTS = guile-snarf |
49 | ||
496f55cd | 50 | EXTRA_DIST = gscm.c gscm.h ChangeLog-scm dynl-dl.c dynl-dld.c dynl-shl.c \ |
ee78fbb0 | 51 | dynl-vms.c DYNAMIC-LINKING PLUGIN/REQ PLUGIN/guile.config \ |
ec8c8a54 | 52 | PLUGIN/guile.libs.in cpp_signal.c cpp_errno.c cpp_err_symbols \ |
2366f445 | 53 | cpp_sig_symbols 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. | |
58 | libpath.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 | |
64 | SUFFIXES = .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. | |
69 | MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) | |
ee78fbb0 | 70 | |
67ec3667 GH |
71 | cpp_err_symbols.c: cpp_err_symbols |
72 | $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols > \ | |
73 | cpp_err_symbols.c | |
ee78fbb0 | 74 | |
67ec3667 GH |
75 | cpp_sig_symbols.c: cpp_sig_symbols |
76 | $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols > \ | |
77 | cpp_sig_symbols.c | |
78 | ||
79 | ## Create a new version of the cpp_sig_symbols file, including all SIGXXX | |
80 | ## macros defined on this platform. | |
81 | check_signals: | |
82 | gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \ | |
83 | | cut -f2 -d' ' | sort > cpp_sig_symbols_here | |
84 | diff -u $(srcdir)/cpp_sig_symbols cpp_sig_symbols_here | egrep '^\+S' \ | |
85 | | cut -c2- > cpp_sig_symbols_diff | |
86 | if test -s cpp_sig_symbols_diff ; then \ | |
87 | cat $(srcdir)/cpp_sig_symbols cpp_sig_symbols_diff \ | |
88 | | sort > cpp_sig_symbols_new ;\ | |
89 | echo "cpp_sig_symbols_new has the following additions:" ;\ | |
90 | cat cpp_sig_symbols_diff ;\ | |
91 | else echo "No new symbols found."; \ | |
92 | fi | |
93 | ||
94 | ## Likewise for cpp_err_symbols. | |
95 | check_errnos: | |
96 | gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \ | |
97 | | cut -f2 -d' ' | sort > cpp_err_symbols_here | |
98 | diff -u $(srcdir)/cpp_err_symbols cpp_err_symbols_here | egrep '^\+E' \ | |
99 | | cut -c2- > cpp_err_symbols_diff | |
100 | if test -s cpp_err_symbols_diff ; then \ | |
101 | cat $(srcdir)/cpp_err_symbols cpp_err_symbols_diff \ | |
102 | | sort > cpp_err_symbols_new ;\ | |
103 | echo "cpp_err_symbols_new has the following additions:" ;\ | |
104 | cat cpp_err_symbols_diff ;\ | |
105 | else echo "No new symbols found."; \ | |
106 | fi | |
107 | ||
108 | CLEANFILES=cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \ | |
109 | cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new |