chiark / gitweb /
@@@ work in progress
[runlisp] / Makefile.am
1 ### -*-makefile-*-
2 ###
3 ### Build script for `runlisp'
4 ###
5 ### (c) 2020 Mark Wooding
6 ###
7
8 ###----- Licensing notice ---------------------------------------------------
9 ###
10 ### This file is part of Runlisp, a tool for invoking Common Lisp scripts.
11 ###
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.
16 ###
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
20 ### for more details.
21 ###
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/>.
24
25 include $(top_srcdir)/vars.am
26
27 SUBDIRS                  =
28
29 pkgdata_DATA             =
30 image_DATA               =
31 image_SCRIPTS            =
32
33 SUBDIRS                 += .
34
35 ACLOCAL_AMFLAGS          = -Im4
36
37 ###--------------------------------------------------------------------------
38 ### The main driver program.
39
40 bin_PROGRAMS            += runlisp
41 runlisp_SOURCES          = runlisp.c
42 runlisp_SOURCES         += common.c common.h
43 runlisp_SOURCES         += lib.c lib.h
44 runlisp_SOURCES         += mdwopt.c mdwopt.h
45 man_MANS                += runlisp.1
46
47 noinst_PROGRAMS         += old-runlisp
48 old_runlisp_SOURCES      = old-runlisp.c
49 old_runlisp_SOURCES     += lib.c lib.h
50
51 noinst_PROGRAMS         += toy
52 toy_SOURCES              = toy.c
53 toy_SOURCES             += lib.c lib.h
54
55 ###--------------------------------------------------------------------------
56 ### Additional machinery.
57
58 pkgdata_DATA            += eval.lisp
59 EXTRA_DIST              += eval.lisp
60
61 ###--------------------------------------------------------------------------
62 ### Image dumping.
63
64 bin_PROGRAMS            += dump-runlisp-image
65 dump_runlisp_image_SOURCES  = dump-runlisp-image.c
66 dump_runlisp_image_SOURCES += common.c common.h
67 dump_runlisp_image_SOURCES += lib.c lib.h
68 dump_runlisp_image_SOURCES += mdwopt.c mdwopt.h
69 man_MANS                += dump-runlisp-image.1
70
71 DUMP_RUNLISP_IMAGE       = $(v_dump)./dump-runlisp-image \
72                                 -f -c$(srcdir)/runlisp.conf -O$@
73
74 v_dump                   = $(v_dump_@AM_V@)
75 v_dump_                  = $(v_dump_@AM_DEFAULT_V@)
76 v_dump_0                 = @echo "  DUMP     $@";
77
78 if DUMP_SBCL
79 image_DATA              += sbcl+asdf.core
80 CLEANFILES              += sbcl+asdf.core
81 sbcl+asdf.core: dump-runlisp-image runlisp.conf
82         $(DUMP_RUNLISP_IMAGE) sbcl
83 endif
84
85 if DUMP_CCL
86 image_DATA              += ccl+asdf.image
87 CLEANFILES              += ccl+asdf.image
88 ccl+asdf.image: dump-runlisp-image runlisp.conf
89         $(DUMP_RUNLISP_IMAGE) ccl
90 endif
91
92 if DUMP_CLISP
93 image_DATA              += clisp+asdf.mem
94 CLEANFILES              += clisp+asdf.mem
95 clisp+asdf.mem: dump-runlisp-image runlisp.conf
96         $(DUMP_RUNLISP_IMAGE) clisp
97 endif
98
99 if DUMP_ECL
100 image_SCRIPTS           += ecl+asdf
101 CLEANFILES              += ecl+asdf
102 ecl+asdf: dump-runlisp-image runlisp.conf
103         $(DUMP_RUNLISP_IMAGE) -odata-dir=$(srcdir) ecl
104 endif
105
106 if DUMP_CMUCL
107 image_DATA              += cmucl+asdf.core
108 CLEANFILES              += cmucl+asdf.core
109 cmucl+asdf.core: dump-runlisp-image runlisp.conf
110         $(DUMP_RUNLISP_IMAGE) cmucl
111 endif
112
113 ###--------------------------------------------------------------------------
114 ### Benchmarking and testing.
115
116 if BENCHMARK
117 SUBDIRS                 += bench
118 endif
119
120 SUBDIRS                 += t
121
122 ###--------------------------------------------------------------------------
123 ### Distribution.
124
125 ## Release number.
126 dist-hook::
127         echo $(VERSION) >$(distdir)/RELEASE
128
129 ## Additional build tools.
130 EXTRA_DIST              += config/auto-version
131
132 ###----- That's all, folks --------------------------------------------------