-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile.generic
215 lines (179 loc) · 6.55 KB
/
Makefile.generic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# Makefile.generic for CLIM 2.0
all: compile cat # $(CLIM)
makeclimfasls: compile cat
ifneq ($(OS_NAME),windows)
compile_depends = wnn.$(SHARED_EXT)
endif
ifeq ($(OS_NAME),windows)
build_runlisp_args = -o build.out
concat_runlisp_args = -o concat.out
endif
compile: FORCE $(PRODUCT-OBJS) $(ICS-PRODUCT-OBJS) $(compile_depends)
rm -f build.tmp
echo '(setq sys::*libtk-pathname* "$(TKLIB)")' >> build.tmp
echo '(setq sys::*libxt-pathname* "$(XTLIB)")' >> build.tmp
echo '(setq sys::*libx11-pathname* "$(XLIB)")' >> build.tmp
echo '(setq sys::*libwnn-pathname* "$(WNNLIB)")' >> build.tmp
echo '(excl:set-case-mode $(CASE_MODE))' >> build.tmp
echo $(STOP_PATCHES) >> build.tmp
echo '(load "misc/compile-1.lisp")' >> build.tmp
echo '(declaim (optimize (speed $(SPEED)) (debug $(DEBUG)) (safety $(SAFETY))))' >> build.tmp
echo '(setq *compile-print* $(compile_print))' >> build.tmp
echo '(setq *compile-verbose* $(compile_verbose))' >> build.tmp
echo '(setq excl::*warn-smp-usage* nil)' >> build.tmp
echo '(setq excl::*unreachable-code-warns* nil)' >> build.tmp
echo '(setq excl:*redefinition-warnings* $(redef_warning))' >> build.tmp
echo '(setq excl:*record-source-file-info* $(RECORD_SOURCE_FILE_INFO))' >> build.tmp
echo '(setq comp:save-local-names-switch $(SAVE_LOCAL_NAMES))' >> build.tmp
echo '(setq comp:save-source-level-debug-info-switch $(SAVE_SOURCE_DEBUG))' >> build.tmp
echo '(setq excl:*load-local-names-info* $(LOAD_LOCAL_NAMES_INFO))' >> build.tmp
echo '(setq excl:*load-source-file-info* $(LOAD_SOURCE_FILE_INFO))' >> build.tmp
echo '(setq excl:*record-xref-info* $(RECORD_XREF_INFO))' >> build.tmp
echo '(setq excl:*load-xref-info* $(LOAD_XREF_INFO))' >> build.tmp
echo '(setf (sys:gsgc-switch :print) $(gc_print))' >> build.tmp
echo '(compile-it (quote $(SYSTEM)))' >> build.tmp
echo '(exit 0)' >> build.tmp
(eval '$(SET_LIBRARY_PATH)'; \
bash ../src/runlisp.sh -f build.tmp $(build_runlisp_args) \
$(CL) $(CLOPTS))
# Concatenation
cat: compile
rm -f cat.tmp
echo '(load "misc/compile-1.lisp")' >> cat.tmp
echo '(setf (sys:gsgc-switch :print) $(gc_print))' >> cat.tmp
echo '(concatenate-it (quote $(SYSTEM)))' >> cat.tmp
echo '(exit 0)' >> cat.tmp
(eval '$(SET_LIBRARY_PATH)'; \
bash ../src/runlisp.sh -f cat.tmp $(concat_runlisp_args) \
$(CL) $(CLOPTS))
ls -lt $(PRODUCT-FASLS) $(ICS-PRODUCT_FASLS) >> Clim-sizes.n
ls -lt $(PRODUCT-FASLS) $(ICS-PRODUCT_FASLS)
$(PRODUCT-FASLS) $(ICS-PRODUCT_FASLS): cat
# Building (loading and dumping)
# It is VERY important not to side-effect
# logical-pathname-translations-database-pathnames in the building phase of
# clim*.dxl. The reason: this change is propagated to delivered images,
# which is very bad. Mostly, it's bad for testing because usually the
# value of (current-directory) below is accessible during testing and it is
# the wrong thing (we always want sys:hosts.cl to be used when testing a
# distribution that users will get).
$(CLIM): FORCE $(PRODUCT-OBJS) $(ICS-PRODUCT-OBJS)
-$(RM) -f $(CLIM)
(eval '$(SET_LIBRARY_PATH)' ; \
$(ECHO) " \
(progn \
(generate-application \
\"$(CLIM)\" \"./\" \
nil \
:pre-load-form \
(quote \
(progn \
(setq sys::*libtk-pathname* \"$(TKLIB)\") \
(setq sys::*libxt-pathname* \"$(XTLIB)\") \
(setq sys::*libx11-pathname* \"$(XLIB)\") \
(setq sys::*libwnn-pathname* \"$(WNNLIB)\") \
(excl:set-case-mode $(CASE_MODE)) \
(load \"misc/dev-load-1.lisp\") \
(load-it '$(SYSTEM)))) \
:autoload-warning nil \
:image-only t \
:purify t \
:debug-on-error t \
:internal-debug \"build-clim.out\" \
:shlib-warning nil \
:libfasl-warning nil \
:record-source-file-info $(RECORD_SOURCE_FILE_INFO) \
:load-source-file-info $(LOAD_SOURCE_FILE_INFO) \
:record-xref-info $(RECORD_XREF_INFO) \
:load-xref-info $(LOAD_XREF_INFO) \
:discard-local-name-info t \
:discard-source-file-info t \
:discard-xref-info t) \
(exit 0))" | $(CL) $(CLOPTS))
@ls -lLt $(CLIM) >> Clim-sizes.n
@ls -lLt $(CLIM)
@echo $(SYSTEM) built!!!!
# Training
train: FORCE
(eval '$(SET_LIBRARY_PATH)' ; \
$(ECHO) " \
(progn \
(load \"misc/train.lisp\") \
(train-clim :frame-tests $(FRAME_TESTS) :train-times $(TRAIN_TIMES) \
:benchmarkp $(TRAIN_BM) :profilep $(TRAIN_PROFILEP) \
:compile $(TRAIN_COMPILE) :psview $(PSVIEW) \
:hpglview $(HPGLVIEW)))" \
| $(LISP) -I $(CLIM) $(CLOPTS))
echo $(SYSTEM) trained!!!!
# the following two rules are used by make-dist so that we don't have
# to build a slim image to run the test suite
load-train: FORCE
(eval '$(SET_LIBRARY_PATH)' ; \
$(ECHO) " \
(setq sys::*libtk-pathname* \"$(TKLIB)\") \
(setq sys::*libxt-pathname* \"$(XTLIB)\") \
(setq sys::*libx11-pathname* \"$(XLIB)\") \
(setq sys::*libwnn-pathname* \"$(WNNLIB)\") \
(load \"misc/dev-load-1.lisp\") \
(load-it '$(SYSTEM)) \
(load \"misc/train.lisp\") \
(train-clim :frame-tests $(FRAME_TESTS) :train-times $(TRAIN_TIMES) \
:benchmarkp $(TRAIN_BM) :profilep $(TRAIN_PROFILEP) \
:compile $(TRAIN_COMPILE) :psview $(PSVIEW) \
:hpglview $(HPGLVIEW) :report-file \"$(REPORT_FILE)\") \
(clim-test::generate-pretty-test-report :file \"$(REPORT_FILE)\")" \
| $(LISP) -I $(CLIM) $(CLOPTS))
generate_test_report: FORCE
($(ECHO) " \
(clim-test::generate-pretty-test-report :file \"$(REPORT_FILE)\")" \
| $(LISP) -I $(CLIM) $(CLOPTS))
profile: FORCE
($(ECHO) " \
(clim-user::run-profile-clim-tests)" \
| $(LISP) -I $(CLIM) $(CLOPTS))
benchmark: FORCE
($(ECHO) " \
(clim-test::benchmark-clim $(BENCHMARK_FILE))" \
| $(LISP) -I $(CLIM) $(CLOPTS))
testps: FORCE
($(ECHO) " \
(load \"test/postscript-tests.lisp\") \
(clim-user::run-postscript-tests :output $(PSVIEW))" \
| $(LISP) -I $(CLIM) $(CLOPTS))
# Misc
cleanobjs:
rm -f *.o
cleanfasls: FORCE
find . -name '*.fasl' -print | xargs rm -f
clean:
rm -f *.out *.tmp
find . -name '*.fasl' -print | xargs rm -f
rm -f *.o *.$(SHARED_EXT) *.a slim \
stub-motif.c stub-olit.c stub-xt.c stub-x.c stub-wnn.c
rm -f *.z *.Z *.gz *.ilt so_locations
rm -f *.pll *.dxl
clean-notes:
cd notes; find . -name '*.lisp' -print | xargs rm -f
tags: FORCE
rm -f TAGS
find . -name '*.lisp' -print | xargs $(TAGS) -a
wc:
wc $(ALL_SRC)
echo_XTLIB:
@echo $(XTLIB)
echo_XLIB:
@echo $(XLIB)
echo_TKLIB:
@echo $(TKLIB)
echo_WNNLIB:
@echo $(WNNLIB)
makeclimobjs: $(PRODUCT-OBJS) $(ICS-PRODUCT-OBJS)
install_obj:
cp $(PRODUCT-OBJS) $(ICS-PRODUCT-OBJS) $(DEST)
install_clim: install_obj
cp $(PRODUCT-FASLS) $(ICS-PRODUCT-FASLS) $(DEST)
echo_src_files:
@echo $(PRODUCT_SRC_FILES)
include Makefile.cobjs
include Makefile.wnn
FORCE: