forked from dylan-lang/opendylan
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
550 lines (474 loc) · 21.2 KB
/
Makefile.in
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
# Changes made here may also need to be made in admin/builds/build-release.bat.
prefix = $(DESTDIR)@prefix@
srcdir = @abs_srcdir@
abs_srcdir = @abs_srcdir@
abs_builddir = @abs_builddir@
OPEN_DYLAN_TARGET_PLATFORM = @OPEN_DYLAN_TARGET_PLATFORM@
RUNTIME_SOURCES = sources/lib/run-time
RUNTIME_TARGET_PLATFORMS = @OPEN_DYLAN_TARGET_PLATFORM@ @ADDITIONAL_RUNTIME_TARGET_PLATFORMS@
FDMAKE_OPTIONS =
fdmake = @PERL@ $(srcdir)/admin/builds/fdmake.pl $(FDMAKE_OPTIONS)
DYLANCOMPILER = @DYLANCOMPILER@
DYLAN_JOBS = 2
.PHONY: 1-stage-bootstrap 1-stage-bootstrap-reentry \
2-stage-bootstrap 2-stage-bootstrap-reentry \
3-stage-bootstrap 3-stage-bootstrap-reentry \
bootstrap-stage-1 bootstrap-stage-2 bootstrap-stage-3 \
all install install-stage release release-stage clean check \
check-submodules
all: @bootstrap_target@
# Only check that submodules are up to date if in a Git repository
ifeq (, $(wildcard $(srcdir)/.git))
SKIP_SUBMODULE_CHECK = 1
endif
ifeq (1,$(SKIP_SUBMODULE_CHECK))
check-submodules:
else
check-submodules:
@for sms in `cd $(srcdir) && git submodule status | grep -v "^ " | cut -c 1`; do \
if [ "$$sms" != "x" ]; then \
echo "**** ERROR ****"; \
echo "One or more submodules is not up to date."; \
echo "Please run 'git submodule update --init'."; \
echo "If you want to skip this check, pass SKIP_SUBMODULE_CHECK=1 to make."; \
exit 1; \
fi; \
done;
endif
###
# 3-stage bootstrap includes stages 1 and 2 and 3: it rebuilds the compiler
# and libraries, then rebuilds them again to take advantage of new
# optimizations. The 3-stage bootstrap is useful to build Open Dylan locally
# without installing it; if you want to install it, do a 3-stage bootstrap and
# run make install
ifneq (@SUPPORT_LLVM@,)
RTG_OPT = BOOTSTRAP_2_RTG="$(abs_builddir)/Bootstrap.1/bin/llvm-runtime-generator"
endif
3-stage-bootstrap: check-submodules
$(MAKE) 3-stage-bootstrap-reentry \
BOOTSTRAP_2_COMPILER="$(abs_builddir)/Bootstrap.1/bin/dylan-compiler -build -verbose -jobs $(DYLAN_JOBS)" \
$(RTG_OPT)
3-stage-bootstrap-reentry: bootstrap-stage-1 bootstrap-stage-2 bootstrap-stage-3
###
# 2-stage bootstrap includes both stages 1 and 2: it rebuilds the compiler to
# support new primitives and rebuilds the libraries using that compiler.
2-stage-bootstrap: check-submodules
$(MAKE) 2-stage-bootstrap-reentry \
BOOTSTRAP_2_COMPILER="$(abs_builddir)/Bootstrap.1/bin/dylan-compiler -build -verbose -jobs $(DYLAN_JOBS)" \
$(RTG_OPT)
2-stage-bootstrap-reentry: bootstrap-stage-1 bootstrap-stage-2
###
# 1-stage bootstrap includes only stage 2: it rebuilds compiler and libraries
# when the existing compiler and libraries will understand the primitives.
1-stage-bootstrap: check-submodules
$(MAKE) 1-stage-bootstrap-reentry \
BOOTSTRAP_2_COMPILER="$(DYLANCOMPILER)"
1-stage-bootstrap-reentry: bootstrap-stage-2
###
# Stage 1 builds a compiler that can understand new primitives used in the
# BOOTSTRAP_1_PRIMITIVE_LIBS libraries. An existing compiler won't understand
# the new stuff, so until a new compiler is built, existing libs are used
# instead. Note that the stage 1 dylan-compiler loads a mix of existing and
# stage 1 libraries.
###
# These are "primitive" in the sense that most of them make use of the
# primitive-* functions.
#
# TODO: the DUIM libraries and some other high-level libs probably don't
# belong in this list.
BOOTSTRAP_1_PRIMITIVE_LIBS = \
dylan common-dylan c-ffi collections io system \
generic-arithmetic big-integers duim-utilities \
duim-geometry duim-dcs duim-sheets duim-graphics \
duim-layouts duim-gadgets duim-frames duim-core \
duim-extended-geometry duim-gadget-panes duim network \
midi deuce duim-deuce com ole ole-server sql odbc-ffi \
sql-odbc corba-dylan corba-protocol dylan-orb \
iop-protocol ir-protocol ir-stubs orb-connections \
orb-core orb-iiop orb-ir orb-poa orb-streams \
orb-utilities portableserver-protocol \
naming-protocol naming-stubs naming-client
BOOTSTRAP_1_REGISTRY = $(abs_srcdir)/sources/bootstrap1-registry
BOOTSTRAP_1_ENV = \
OPEN_DYLAN_TARGET_PLATFORM=$(OPEN_DYLAN_TARGET_PLATFORM) \
OPEN_DYLAN_BUILD_LOGS=$(abs_builddir)/Bootstrap.1/build/logs \
OPEN_DYLAN_USER_ROOT=$(abs_builddir)/Bootstrap.1 \
OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.1 \
OPEN_DYLAN_USER_BUILD=$(abs_builddir)/Bootstrap.1/build \
OPEN_DYLAN_USER_REGISTRIES=$(BOOTSTRAP_1_REGISTRY) \
OPEN_DYLAN_USER_SOURCES=$(abs_srcdir)/sources
BOOTSTRAP_1_LIBRARIES = dylan-compiler
ifneq (@SUPPORT_LLVM@,)
BOOTSTRAP_1_LIBRARIES += llvm-runtime-generator
endif
$(abs_builddir)/Bootstrap.1:
mkdir $(abs_builddir)/Bootstrap.1
mkdir $(abs_builddir)/Bootstrap.1/bin
mkdir $(abs_builddir)/Bootstrap.1/lib
mkdir $(abs_builddir)/Bootstrap.1/lib/runtime
mkdir $(abs_builddir)/Bootstrap.1/build
mkdir $(abs_builddir)/Bootstrap.1/build/logs
# BOOTSTRAP_1_PRIMITIVE_LIBS registry files are removed so those
# libraries are taken from the bootstrap compiler's system registries.
# The main point of stage 1 is to compile any changed compiler sources.
$(BOOTSTRAP_1_REGISTRY):
mkdir $(BOOTSTRAP_1_REGISTRY)
cp -r $(srcdir)/sources/registry/generic $(BOOTSTRAP_1_REGISTRY)
cp -r $(srcdir)/sources/registry/$(OPEN_DYLAN_TARGET_PLATFORM) $(BOOTSTRAP_1_REGISTRY)
for lib in $(BOOTSTRAP_1_PRIMITIVE_LIBS); do \
rm -f $(BOOTSTRAP_1_REGISTRY)/generic/$$lib; \
rm -f $(BOOTSTRAP_1_REGISTRY)/$(OPEN_DYLAN_TARGET_PLATFORM)/$$lib; \
done
$(abs_builddir)/Bootstrap.1/bin/dylan-compiler:
@echo Building Open Dylan bootstrap stage 1...
@OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.1 \
$(MAKE) -C sources/jamfiles install
@for target_platform in $(RUNTIME_TARGET_PLATFORMS); do \
$(MAKE) -C $(RUNTIME_SOURCES) \
OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.1 \
OPEN_DYLAN_TARGET_PLATFORM=$$target_platform \
install; \
done
@$(BOOTSTRAP_1_ENV) \
$(fdmake) --compiler="$(DYLANCOMPILER)" \
$(BOOTSTRAP_1_LIBRARIES)
bootstrap-stage-1: \
$(abs_builddir)/Bootstrap.1 \
$(BOOTSTRAP_1_REGISTRY) \
$(abs_builddir)/Bootstrap.1/bin/dylan-compiler
###
# Stage 2 bootstrap builds altered libraries and compiler and does not link to
# any existing or stage 1 libraries.
BOOTSTRAP_2_ENV = \
OPEN_DYLAN_TARGET_PLATFORM=$(OPEN_DYLAN_TARGET_PLATFORM) \
OPEN_DYLAN_BUILD_LOGS=$(abs_builddir)/Bootstrap.2/build/logs \
OPEN_DYLAN_USER_ROOT=$(abs_builddir)/Bootstrap.2 \
OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.2 \
OPEN_DYLAN_USER_BUILD=$(abs_builddir)/Bootstrap.2/build \
OPEN_DYLAN_USER_REGISTRIES=$(abs_srcdir)/sources/registry \
OPEN_DYLAN_USER_SOURCES=$(abs_srcdir)/sources
BOOTSTRAP_2_UNSET_ENV = \
OPEN_DYLAN_RELEASE_ROOT \
OPEN_DYLAN_RELEASE_INSTALL \
OPEN_DYLAN_RELEASE_BUILD \
OPEN_DYLAN_RELEASE_REGISTRIES \
OPEN_DYLAN_RELEASE_SOURCES
BOOTSTRAP_2_LIBRARIES = dylan-compiler
ifneq (@SUPPORT_LLVM@,)
BOOTSTRAP_2_LIBRARIES += llvm-runtime-generator
endif
$(abs_builddir)/Bootstrap.2:
mkdir $(abs_builddir)/Bootstrap.2
mkdir $(abs_builddir)/Bootstrap.2/bin
mkdir $(abs_builddir)/Bootstrap.2/lib
mkdir $(abs_builddir)/Bootstrap.2/lib/runtime
mkdir $(abs_builddir)/Bootstrap.2/build
mkdir $(abs_builddir)/Bootstrap.2/build/logs
$(abs_builddir)/Bootstrap.2/bin/dylan-compiler:
@echo Building Open Dylan bootstrap stage 2...
@OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.2 \
$(MAKE) -C sources/jamfiles install
@for target_platform in $(RUNTIME_TARGET_PLATFORMS); do \
unset $(BOOTSTRAP_2_UNSET_ENV) ; \
$(MAKE) -C $(RUNTIME_SOURCES) \
OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.2 \
OPEN_DYLAN_TARGET_PLATFORM=$$target_platform \
OPEN_DYLAN_LLVM_RUNTIME_GENERATOR=$(BOOTSTRAP_2_RTG) \
install; \
done
@unset $(BOOTSTRAP_2_UNSET_ENV) ; \
$(BOOTSTRAP_2_ENV) \
$(fdmake) --compiler="$(BOOTSTRAP_2_COMPILER)" \
$(BOOTSTRAP_2_LIBRARIES)
bootstrap-stage-2: \
$(abs_builddir)/Bootstrap.2 \
$(abs_builddir)/Bootstrap.2/bin/dylan-compiler
###
# Stage 3 builds libraries and compiler using stage 2 products, taking
# advantage of any new optimizations etc. in this release. It basically builds
# an installation without actually installing it.
BOOTSTRAP_3_ENV = \
OPEN_DYLAN_TARGET_PLATFORM=$(OPEN_DYLAN_TARGET_PLATFORM) \
OPEN_DYLAN_RELEASE_ROOT=$(abs_builddir)/Bootstrap.2 \
OPEN_DYLAN_RELEASE_INSTALL=$(abs_builddir)/Bootstrap.2 \
OPEN_DYLAN_RELEASE_BUILD=$(abs_builddir)/Bootstrap.2/build \
OPEN_DYLAN_RELEASE_REGISTRIES=$(abs_srcdir)/sources/registry \
OPEN_DYLAN_RELEASE_SOURCES=$(abs_srcdir)/sources \
OPEN_DYLAN_BUILD_LOGS=$(abs_builddir)/Bootstrap.3/build/logs \
OPEN_DYLAN_USER_ROOT=$(abs_builddir)/Bootstrap.3 \
OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.3 \
OPEN_DYLAN_USER_BUILD=$(abs_builddir)/Bootstrap.3/build \
OPEN_DYLAN_USER_REGISTRIES=$(abs_srcdir)/sources/registry \
OPEN_DYLAN_USER_SOURCES=$(abs_srcdir)/sources
BOOTSTRAP_3_LIBRARIES = \
dylan-compiler dylan-environment parser-compiler dswank make-dylan-app
BOOTSTRAP_3_COMPILER = \
$(abs_builddir)/Bootstrap.2/bin/dylan-compiler -build -verbose -jobs $(DYLAN_JOBS)
ifneq (@SUPPORT_LLVM@,)
BOOTSTRAP_3_RTG = $(abs_builddir)/Bootstrap.2/bin/llvm-runtime-generator
endif
$(abs_builddir)/Bootstrap.3:
mkdir $(abs_builddir)/Bootstrap.3
mkdir $(abs_builddir)/Bootstrap.3/bin
mkdir $(abs_builddir)/Bootstrap.3/lib
mkdir $(abs_builddir)/Bootstrap.3/lib/runtime
mkdir $(abs_builddir)/Bootstrap.3/build
mkdir $(abs_builddir)/Bootstrap.3/build/logs
bootstrap-stage-3: $(abs_builddir)/Bootstrap.3
@echo Building Open Dylan bootstrap stage 3...
@OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.3 \
$(MAKE) -C sources/jamfiles install
@for target_platform in $(RUNTIME_TARGET_PLATFORMS); do \
$(MAKE) -C $(RUNTIME_SOURCES) \
OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.3 \
OPEN_DYLAN_TARGET_PLATFORM=$$target_platform \
OPEN_DYLAN_LLVM_RUNTIME_GENERATOR=$(BOOTSTRAP_3_RTG) \
install; \
done
@$(BOOTSTRAP_3_ENV) \
$(fdmake) --compiler="$(BOOTSTRAP_3_COMPILER)" \
$(BOOTSTRAP_3_LIBRARIES)
cli3:
@$(BOOTSTRAP_3_ENV) $(BOOTSTRAP_3_COMPILER)
BACKENDS = x86-win32 \
x86-darwin \
x86_64-darwin \
x86-linux \
x86_64-linux \
x86-freebsd \
x86_64-freebsd
rtg:
$(MAKE) bootstrap-stage-3 BOOTSTRAP_3_LIBRARIES=llvm-runtime-generator
for target in $(BACKENDS); do \
./Bootstrap.3/bin/llvm-runtime-generator $(abs_srcdir)/sources/dylan/dylan.lid $$target && \
llvm-dis $$target-runtime.bc && \
clang -O3 -S $$target-runtime.bc; \
done
###
# 4 stage bootstrap is for LLVM testing.
BOOTSTRAP_4_ENV = \
OPEN_DYLAN_TARGET_PLATFORM=$(OPEN_DYLAN_TARGET_PLATFORM) \
OPEN_DYLAN_RELEASE_ROOT=$(abs_builddir)/Bootstrap.3 \
OPEN_DYLAN_RELEASE_INSTALL=$(abs_builddir)/Bootstrap.3 \
OPEN_DYLAN_RELEASE_BUILD=$(abs_builddir)/Bootstrap.3/build \
OPEN_DYLAN_RELEASE_REGISTRIES=$(abs_srcdir)/sources/registry:$(library_srcdir)/registry \
OPEN_DYLAN_RELEASE_SOURCES=$(abs_srcdir)/sources \
OPEN_DYLAN_BUILD_LOGS=$(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)/build/logs \
OPEN_DYLAN_USER_ROOT=$(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM) \
OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM) \
OPEN_DYLAN_USER_BUILD=$(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)/build \
OPEN_DYLAN_USER_REGISTRIES=$(abs_srcdir)/sources/registry:$(library_srcdir)/registry \
OPEN_DYLAN_USER_SOURCES=$(abs_srcdir)/sources
BOOTSTRAP_4_LIBRARIES = dylan-compiler
BOOTSTRAP_4_COMPILER = \
$(abs_builddir)/Bootstrap.3/bin/dylan-compiler -build -dfm -jobs $(DYLAN_JOBS)
$(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM):
mkdir $(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)
mkdir $(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)/bin
mkdir $(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)/lib
mkdir $(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)/lib/runtime
mkdir $(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)/build
mkdir $(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)/build/logs
bootstrap-stage-4: $(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)
@echo Building Open Dylan bootstrap stage 4...
@OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM) \
$(MAKE) -C $(rt_build) install
@$(BOOTSTRAP_4_ENV) \
$(fdmake) --compiler="$(BOOTSTRAP_4_COMPILER)" \
$(BOOTSTRAP_4_LIBRARIES)
cli4:
@$(BOOTSTRAP_4_ENV) $(BOOTSTRAP_4_COMPILER)
testc: $(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)
@printf "set compiler-back-end c\nopen dylan\nbuild -nolink -output dfm" \
| $(BOOTSTRAP_4_ENV) $(BOOTSTRAP_4_COMPILER)
@printf "set compiler-back-end c\nopen common-dylan\nbuild -nolink -output dfm" \
| $(BOOTSTRAP_4_ENV) $(BOOTSTRAP_4_COMPILER)
testl: $(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)
@printf "set compiler-back-end llvm\nopen dylan\nbuild -nolink -output dfm" \
| $(BOOTSTRAP_4_ENV) $(BOOTSTRAP_4_COMPILER)
@(cd Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)/build/dylan && \
for i in *.bc; do \
echo $$i; \
llvm-dis $$i && clang -O3 -S $$i; \
done)
@printf "set compiler-back-end llvm\nopen common-dylan\nbuild -nolink -output dfm" \
| $(BOOTSTRAP_4_ENV) $(BOOTSTRAP_4_COMPILER)
@(cd Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)/build/common-dylan && \
for i in *.bc; do \
echo $$i; \
llvm-dis $$i && clang -O3 -S $$i; \
done)
xtestl:
for target in $(BACKENDS); do \
$(MAKE) testl OPEN_DYLAN_TARGET_PLATFORM=$$target; \
done
###
# Install stage installs stage 3 into prefix
install-stage:
@echo Preparing to install Open Dylan in $(prefix)...
@install -d $(prefix)
@echo Copying sources to $(prefix)/sources...
@rm -rf $(prefix)/sources
@cp -R $(abs_srcdir)/sources $(prefix)
@find $(prefix)/sources -depth -name '.*' -exec rm -rf {} \;
@-rm -rf $(prefix)/sources/bootstrap1-registry
@echo Installing Open Dylan in $(prefix)
@install -d $(prefix)/bin $(prefix)/databases $(prefix)/lib $(prefix)/lib/runtime
@install -d $(prefix)/share/opendylan $(prefix)/include/opendylan
@cp -R $(abs_builddir)/Bootstrap.3/bin $(prefix)
@cp -R $(abs_builddir)/Bootstrap.3/databases $(prefix)
@-cp -R $(abs_builddir)/Bootstrap.3/include/opendylan $(prefix)/include
@# We use force here because on macOS, the lib directory likely contains read-only
@# static libraries for the Boehm GC.
@cp -Rf $(abs_builddir)/Bootstrap.3/lib $(prefix)
@cp -Rf $(abs_builddir)/Bootstrap.3/share/opendylan $(prefix)/share
@cp -R $(abs_srcdir)/tools/lldb $(prefix)/share/opendylan
@cp -R $(abs_srcdir)/tools/bash_completion $(prefix)/share/opendylan
@cp $(abs_srcdir)/tools/scripts/dylan-lldb $(prefix)/bin
@cp $(abs_srcdir)/License.txt $(prefix)
@cp $(abs_srcdir)/packages/unix/README $(prefix)
@echo Done!
install: 3-stage-bootstrap install-stage
version ?= $(shell $(abs_builddir)/Bootstrap.3/bin/dylan-compiler -shortversion)
###
# release packs a tarball
release-stage:
-mkdir $(abs_builddir)/release
-mkdir $(abs_builddir)/release/opendylan-$(version)
-mkdir $(abs_builddir)/release/opendylan-$(version)/bin
-mkdir $(abs_builddir)/release/opendylan-$(version)/databases
-mkdir -p $(abs_builddir)/release/opendylan-$(version)/include/opendylan
-mkdir $(abs_builddir)/release/opendylan-$(version)/lib
-mkdir $(abs_builddir)/release/opendylan-$(version)/sources
-mkdir -p $(abs_builddir)/release/opendylan-$(version)/share/opendylan
@echo Copying sources...
cp -R $(abs_srcdir)/sources $(abs_builddir)/release/opendylan-$(version)
@echo Removing unnecessary directories...
find $(abs_builddir)/release/opendylan-$(version)/sources -depth -name '.*' -exec rm -rf {} \;
-rm -r $(abs_builddir)/release/opendylan-$(version)/sources/bootstrap1-registry
cp -R $(abs_builddir)/Bootstrap.3/bin $(abs_builddir)/release/opendylan-$(version)
cp -R $(abs_builddir)/Bootstrap.3/databases $(abs_builddir)/release/opendylan-$(version)
-cp -R $(abs_builddir)/Bootstrap.3/include/opendylan $(abs_builddir)/release/opendylan-$(version)/include
cp -R $(abs_builddir)/Bootstrap.3/lib $(abs_builddir)/release/opendylan-$(version)
cp -R $(abs_builddir)/Bootstrap.3/share/opendylan $(abs_builddir)/release/opendylan-$(version)/share
cp -R $(abs_srcdir)/tools/lldb $(abs_builddir)/release/opendylan-$(version)/share/opendylan
cp -R $(abs_srcdir)/tools/bash_completion $(abs_builddir)/release/opendylan-$(version)/share/opendylan
cp $(abs_srcdir)/License.txt $(abs_builddir)/release/opendylan-$(version)
cp $(abs_srcdir)/packages/unix/README $(abs_builddir)/release/opendylan-$(version)
cd $(abs_builddir)/release; \
tar cjf $(abs_builddir)/opendylan-$(version)-$(OPEN_DYLAN_TARGET_PLATFORM).tar.bz2 opendylan-$(version)
-mkdir $(abs_builddir)/release/opendylan-$(version)/build
cp -R $(abs_builddir)/Bootstrap.3/build $(abs_builddir)/release/opendylan-$(version)
cd $(abs_builddir)/release/; \
tar cjf $(abs_builddir)/opendylan-$(version)-$(OPEN_DYLAN_TARGET_PLATFORM)-debug-info.tar.bz2 opendylan-$(version)/build
release: 3-stage-bootstrap release-stage
###
# Maintenance and test targets
install-strip:
clean:
-rm -rf $(abs_builddir)/Bootstrap.1
-rm -rf $(abs_builddir)/Bootstrap.2
-rm -rf $(abs_builddir)/Bootstrap.3
-rm -rf $(abs_builddir)/release
-rm -rf $(abs_builddir)/opendylan-*.tar.bz2
-rm -rf $(BOOTSTRAP_1_REGISTRY)
@for target_platform in $(RUNTIME_TARGET_PLATFORMS); do \
$(MAKE) -C $(RUNTIME_SOURCES) \
OPEN_DYLAN_TARGET_PLATFORM=$$target_platform \
clean; \
done
rm -f $(srcdir)/sources/app/llvm-tablegen/tablegen-parser.dylan
rm -f $(srcdir)/sources/lib/llvm/llvm-asm-parser.dylan
rm -f $(srcdir)/sources/corba/scepter/front-end/file/parser.dylan
rm -rf $(srcdir)/sources/corba/orb/iop-protocol
rm -rf $(srcdir)/sources/corba/orb/ir-protocol
rm -rf $(srcdir)/sources/corba/orb/ir-stubs
rm -rf $(srcdir)/sources/corba/services/naming/naming-protocol
rm -rf $(srcdir)/sources/corba/services/naming/naming-skeletons
rm -rf $(srcdir)/sources/corba/services/naming/naming-stubs
rm -rf $(srcdir)/sources/corba/demos/pente/protocol/
rm -rf $(srcdir)/sources/corba/demos/pente/skeletons/
rm -rf $(srcdir)/sources/corba/demos/pente/stubs/
rm -rf $(srcdir)/sources/corba/tests/idl/protocol/
rm -rf $(srcdir)/sources/corba/tests/idl/skeletons/
rm -rf $(srcdir)/sources/corba/tests/idl/stubs/
rm -rf $(srcdir)/sources/runtime-manager/debugger-nub/protocol
rm -rf $(srcdir)/sources/runtime-manager/debugger-nub/skeletons
rm -rf $(srcdir)/sources/runtime-manager/debugger-nub/stubs
distclean: clean
-rm -f aclocal.m4
-rm -f configure
-rm -f config.log
-rm -f config.status
-rm -f config.status.lineno
-rm -f Makefile
-rm -f sources/lib/run-time/Makefile
-rm -f sources/jamfiles/Makefile sources/jamfiles/config.jam
-rm -rf build-aux
-rm -rf autom4te.cache
mostlyclean:
maintainer-clean:
TAGS:
dist:
CHECK_STAGE = 3
CHECK_COMPILER_STAGE = $(CHECK_STAGE)
CHECK_APPS = \
libraries-test-suite-app \
dfmc-reader-test-suite-app \
strings-test-suite-app \
c-ffi-test-suite-app \
duim-test-suite-app \
deuce-test-suite-app \
jam-test-suite-app \
channels-tests \
variable-search-tests \
command-line-parser-test-suite-app \
logging-test-suite-app \
regular-expressions-test-suite \
hash-algorithms-test
CHECK_ENV = \
OPEN_DYLAN_TARGET_PLATFORM=$(OPEN_DYLAN_TARGET_PLATFORM) \
OPEN_DYLAN_RELEASE_ROOT=$(abs_builddir)/Bootstrap.$(CHECK_STAGE) \
OPEN_DYLAN_RELEASE_INSTALL=$(abs_builddir)/Bootstrap.$(CHECK_STAGE) \
OPEN_DYLAN_RELEASE_BUILD=$(abs_builddir)/Bootstrap.$(CHECK_STAGE)/build \
OPEN_DYLAN_RELEASE_REGISTRIES=$(abs_srcdir)/sources/registry \
OPEN_DYLAN_RELEASE_SOURCES=$(abs_srcdir)/sources \
OPEN_DYLAN_BUILD_LOGS=$(abs_builddir)/Bootstrap.$(CHECK_STAGE)/build/logs \
OPEN_DYLAN_USER_ROOT=$(abs_builddir)/Bootstrap.$(CHECK_STAGE) \
OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.$(CHECK_STAGE) \
OPEN_DYLAN_USER_BUILD=$(abs_builddir)/Bootstrap.$(CHECK_STAGE)/build \
OPEN_DYLAN_USER_REGISTRIES=$(abs_srcdir)/sources/registry \
OPEN_DYLAN_USER_SOURCES=$(abs_srcdir)/sources
check: bootstrap-stage-$(CHECK_COMPILER_STAGE)
@$(CHECK_ENV) \
$(fdmake) \
--compiler="$(abs_builddir)/Bootstrap.$(CHECK_COMPILER_STAGE)/bin/dylan-compiler -build -jobs $(DYLAN_JOBS)" \
$(CHECK_APPS) && \
for app in $(CHECK_APPS); do \
echo "Executing test app $$app ..."; \
$(abs_builddir)/Bootstrap.$(CHECK_STAGE)/bin/$$app $(OPEN_DYLAN_CHECK_FLAGS); \
done
BOOTSTRAP_4_RTG = $(abs_builddir)/Bootstrap.3/bin/llvm-runtime-generator
LLVM_CHECK_APPS = \
dylan-test-suite-app
check-llvm: $(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)
$(MAKE) bootstrap-stage-3 \
BOOTSTRAP_3_LIBRARIES="llvm-runtime-generator dylan-compiler"
@OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM) \
$(MAKE) -C sources/jamfiles install
@OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM) \
OPEN_DYLAN_LLVM_RUNTIME_GENERATOR=$(BOOTSTRAP_4_RTG) \
OPEN_DYLAN_TARGET_PLATFORM=$(OPEN_DYLAN_TARGET_PLATFORM) \
$(MAKE) -C $(RUNTIME_SOURCES) install-llvm-runtime
@$(BOOTSTRAP_4_ENV) \
$(fdmake) --compiler="$(BOOTSTRAP_4_COMPILER) -back-end llvm" \
$(LLVM_CHECK_APPS)
@for app in $(LLVM_CHECK_APPS); do \
echo "Executing test app $$app ..."; \
$(abs_builddir)/Bootstrap.4.$(OPEN_DYLAN_TARGET_PLATFORM)/bin/$$app $(OPEN_DYLAN_CHECK_FLAGS); \
done
installcheck:
installdirs:
Makefile: $(srcdir)/Makefile.in config.status
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=./$@ $(SHELL) ./config.status