3 ### Build script for `runlisp'
5 ### (c) 2020 Mark Wooding
8 ###----- Licensing notice ---------------------------------------------------
10 ### This file is part of Runlisp, a tool for invoking Common Lisp scripts.
12 ### Runlisp is free software: you can redistribute it and/or modify it
13 ### under the terms of the GNU General Public License as published by the
14 ### Free Software Foundation; either version 3 of the License, or (at your
15 ### option) any later version.
17 ### Runlisp is distributed in the hope that it will be useful, but WITHOUT
18 ### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 ### FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 ### You should have received a copy of the GNU General Public License
23 ### along with Runlisp. If not, see <https://www.gnu.org/licenses/>.
25 include $(top_srcdir)/vars.am
34 ACLOCAL_AMFLAGS = -Im4
36 ###--------------------------------------------------------------------------
37 ### A library of common code.
39 noinst_LIBRARIES += librunlisp.a
40 librunlisp_a_SOURCES =
42 librunlisp_a_SOURCES += common.c common.h
43 librunlisp_a_SOURCES += lib.c lib.h
44 librunlisp_a_SOURCES += mdwopt.c mdwopt.h
46 ###--------------------------------------------------------------------------
47 ### The main driver program.
49 bin_PROGRAMS += runlisp
50 runlisp_SOURCES = runlisp.c
51 runlisp_LDADD = librunlisp.a
53 doc_DATA += runlisp.pdf
54 EXTRA_DIST += runlisp.1
56 noinst_PROGRAMS += old-runlisp
57 old_runlisp_SOURCES = old-runlisp.c
58 old_runlisp_LDADD = librunlisp.a
60 noinst_PROGRAMS += toy
62 toy_SOURCES += lib.c lib.h
64 ###--------------------------------------------------------------------------
65 ### Additional machinery.
67 pkgdata_DATA += eval.lisp
68 EXTRA_DIST += eval.lisp
70 pkgdata_DATA += dump-ecl
71 EXTRA_DIST += dump-ecl
73 bin_PROGRAMS += query-runlisp-config
74 query_runlisp_config_SOURCES = query-runlisp-config.c
75 query_runlisp_config_LDADD = librunlisp.a
76 man_MANS += query-runlisp-config.1
77 doc_DATA += query-runlisp-config.pdf
79 man_MANS += runlisp.conf.5
80 doc_DATA += runlisp.conf.pdf
82 EXTRA_DIST += runlisp-base.conf
84 $(MKDIR_P) $(DESTDIR)$(pkgconfdir)/runlisp.d
85 cp $(srcdir)/runlisp-base.conf \
86 $(DESTDIR)$(pkgconfdir)/runlisp.d/0base.conf
88 rm -f $(DESTDIR)$(pkgconfdir)/runlisp.d/0base.conf
90 EXTRA_DIST += runlisp.conf
92 $(MKDIR_P) $(DESTDIR)$(pkgconfdir)
93 if ! [ -f $(DESTDIR)$(pkgconfdir)/runlisp.conf ]; then \
94 cp $(srcdir)/runlisp.conf $(DESTDIR)$(pkgconfdir)/; \
97 rm -f $(DESTDIR)$(pkgconfdir)/runlisp.conf
99 ###--------------------------------------------------------------------------
102 bin_PROGRAMS += dump-runlisp-image
103 dump_runlisp_image_SOURCES = dump-runlisp-image.c
104 dump_runlisp_image_LDADD = librunlisp.a
105 man_MANS += dump-runlisp-image.1
106 doc_DATA += dump-runlisp-image.pdf
107 EXTRA_DIST += dump-runlisp-image.1
109 DUMP_RUNLISP_IMAGE = $(v_dump)./dump-runlisp-image \
110 -f -c$(srcdir)/runlisp-base.conf -O$@
112 v_dump = $(v_dump_@AM_V@)
113 v_dump_ = $(v_dump_@AM_DEFAULT_V@)
114 v_dump_0 = @echo " DUMP $@";
117 image_DATA += sbcl+asdf.core
118 CLEANFILES += sbcl+asdf.core
119 sbcl+asdf.core: dump-runlisp-image runlisp-base.conf
120 $(DUMP_RUNLISP_IMAGE) sbcl
124 image_DATA += ccl+asdf.image
125 CLEANFILES += ccl+asdf.image
126 ccl+asdf.image: dump-runlisp-image runlisp-base.conf
127 $(DUMP_RUNLISP_IMAGE) ccl
131 image_DATA += clisp+asdf.mem
132 CLEANFILES += clisp+asdf.mem
133 clisp+asdf.mem: dump-runlisp-image runlisp-base.conf
134 $(DUMP_RUNLISP_IMAGE) clisp
138 image_SCRIPTS += ecl+asdf
139 CLEANFILES += ecl+asdf
140 ecl+asdf: dump-runlisp-image runlisp-base.conf dump-ecl
141 $(DUMP_RUNLISP_IMAGE) -odata-dir=$(srcdir) ecl
145 image_DATA += cmucl+asdf.core
146 CLEANFILES += cmucl+asdf.core
147 cmucl+asdf.core: dump-runlisp-image runlisp-base.conf
148 $(DUMP_RUNLISP_IMAGE) cmucl
151 ###--------------------------------------------------------------------------
152 ### Other subdirectories.
165 ###--------------------------------------------------------------------------
170 echo $(VERSION) >$(distdir)/RELEASE
172 ## Additional build tools.
173 EXTRA_DIST += config/auto-version
175 ###----- That's all, folks --------------------------------------------------