-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile.in
489 lines (435 loc) · 17.9 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
SHELL=@SHELL@
KITVERSION=@PACKAGE_VERSION@
prefix=@prefix@
datarootdir=@datarootdir@
datadir=@datadir@
srcdir=@srcdir@
top_srcdir=@top_srcdir@
exec_prefix=@exec_prefix@
VPATH=@srcdir@
SYSCONFDIR=$(DESTDIR)@sysconfdir@
INSTDIR=$(DESTDIR)$(exec_prefix)
INSTDIR_BARRY=$(DESTDIR)@exec_prefix@
MANDIR=$(DESTDIR)@mandir@
LIBDIR=$(DESTDIR)@libdir@
BINDIR=$(DESTDIR)@bindir@
DATADIR=$(DESTDIR)@datadir@
MKDIR=$(top_srcdir)/mkinstalldirs
INSTALL=@INSTALL@
INSTALLDATA=@INSTALL_DATA@
LN=@LN_S@
STRIP=strip
DIFF=diff
MLCOMP=@mlcomp@
CWD=$(shell pwd)
export INSTDIR
export INSTDIR_BARRY
include Makefiledefault
ifeq ($(shell uname),Darwin)
TIMECMD=/usr/bin/time -l
else
TIMECMD=/usr/bin/time -f 'Command being timed: "%C"\nUser time (seconds): %U\nSystem time (seconds): %S\nElabsed (wall clock) time (seconds): %e\nMaximum resident set size (Kbytes): %M'
endif
# Some commands
@SET_MAKE@
CLEAN=rm -rf MLB *~ .\#*
.PHONY: mlkit
mlkit:
$(MKDIR) bin
$(MAKE) -C src mlkit
$(MAKE) -C src reml
$(MAKE) man_mlkit
.PHONY: smltojs
smltojs:
$(MKDIR) bin
$(MAKE) -C src smltojs
$(MAKE) man_smltojs
all: mlkit mlkit_basislibs smltojs smltojs_basislibs
.PHONY: mlkit_basislibs
mlkit_basislibs: mlkit
(cd basis && SML_LIB=.. ../bin/mlkit -c -no_gc repl.mlb)
(cd basis && SML_LIB=.. ../bin/mlkit -c -no_gc -par repl.mlb)
(cd basis && SML_LIB=.. ../bin/mlkit -c -gc basis.mlb)
(cd basis && SML_LIB=.. ../bin/mlkit -c -gc -prof basis.mlb)
(cd basis && SML_LIB=.. ../bin/mlkit -c -no_gc -prof -Pcee -Prfg -Ppp -print_rho_types -log_to_file basis.mlb)
.PHONY: mlkit_kitlibs
mlkit_kitlibs:
(cd basis && SML_LIB=.. ../bin/mlkit -c -no_gc kitlib.mlb)
(cd basis && SML_LIB=.. ../bin/mlkit -c -gc kitlib.mlb)
(cd basis && SML_LIB=.. ../bin/mlkit -c -gc -prof kitlib.mlb)
(cd basis && SML_LIB=.. ../bin/mlkit -c -no_gc -prof kitlib.mlb)
.PHONY: mlkit_cleanlibs
mlkit_cleanlibs:
(cd basis && find . -name MLB -type d | xargs rm -rf)
.PHONY: mlkit_libs
mlkit_libs: mlkit_cleanlibs
$(MAKE) mlkit_basislibs
$(MAKE) mlkit_kitlibs
.PHONY: smltojs_cleanlibs
smltojs_cleanlibs:
(cd js/basis && find . -name MLB -type d | xargs rm -rf)
.PHONY: smltojs_basislibs
smltojs_basislibs: smltojs_cleanlibs
(cd js/basis && SML_LIB=.. ../../bin/smltojs -aopt -export_basis_js -c basis.mlb)
(cd js/basis && SML_LIB=.. ../../bin/smltojs -aopt -export_basis_js -c js.mlb)
(cd js/basis && SML_LIB=.. ../../bin/smltojs -aopt -export_basis_js -c rwp.mlb)
(cd js/basis && SML_LIB=.. ../../bin/smltojs -aopt -export_basis_js -c utest.mlb)
(cd js/basis && SML_LIB=.. ../../bin/smltojs -aopt -export_basis_js -c xmlrpc.mlb)
(cd js/basis && SML_LIB=.. ../../bin/smltojs -aopt -export_basis_js -c dojo.mlb)
.PHONY: install_smltojs_basislibs
install_smltojs_basislibs:
$(MKDIR) $(LIBDIR)/basis
$(INSTALLDATA) -p js/basis/*.{sml,sig,mlb} $(LIBDIR)/basis
$(MKDIR) $(LIBDIR)/basis/MLB/Js/
$(INSTALLDATA) -p js/basis/MLB/Js/*.{d,eb,eb1,lnk,js,df} $(LIBDIR)/basis/MLB/Js
.PHONY: install_mlkit_basislibs
install_mlkit_basislibs:
$(MKDIR) $(LIBDIR)/basis/MLB
$(MKDIR) $(LIBDIR)/basis/MLB/RI
$(MKDIR) $(LIBDIR)/basis/MLB/RI_GC
$(MKDIR) $(LIBDIR)/basis/MLB/RI_GC_PROF
$(MKDIR) $(LIBDIR)/basis/MLB/RI_PROF
$(MKDIR) $(LIBDIR)/basis/io/MLB
$(MKDIR) $(LIBDIR)/basis/io/MLB/RI
$(MKDIR) $(LIBDIR)/basis/io/MLB/RI_GC
$(MKDIR) $(LIBDIR)/basis/io/MLB/RI_GC_PROF
$(MKDIR) $(LIBDIR)/basis/io/MLB/RI_PROF
$(INSTALLDATA) -p basis/MLB/RI/*.{d,eb,eb1,lnk,o,df} $(LIBDIR)/basis/MLB/RI
$(INSTALLDATA) -p basis/MLB/RI_GC/*.{d,eb,eb1,lnk,o,df} $(LIBDIR)/basis/MLB/RI_GC
$(INSTALLDATA) -p basis/MLB/RI_PROF/*.{d,eb,eb1,lnk,o,rev,df} $(LIBDIR)/basis/MLB/RI_PROF
$(INSTALLDATA) -p basis/MLB/RI_GC_PROF/*.{d,eb,eb1,lnk,o,rev,df} $(LIBDIR)/basis/MLB/RI_GC_PROF
$(INSTALLDATA) -p basis/io/MLB/RI/*.{d,eb,eb1,lnk,o} $(LIBDIR)/basis/io/MLB/RI
$(INSTALLDATA) -p basis/io/MLB/RI_GC/*.{d,eb,eb1,lnk,o} $(LIBDIR)/basis/io/MLB/RI_GC
$(INSTALLDATA) -p basis/io/MLB/RI_PROF/*.{d,eb,eb1,lnk,o,rev} $(LIBDIR)/basis/io/MLB/RI_PROF
$(INSTALLDATA) -p basis/io/MLB/RI_GC_PROF/*.{d,eb,eb1,lnk,o,rev} $(LIBDIR)/basis/io/MLB/RI_GC_PROF
.PHONY: barry
barry:
$(MKDIR) bin
$(MAKE) -C src barry
$(MAKE) man_barry
.PHONY: clean
clean:
$(CLEAN) bin run lib bootstrap dist man/man1/*.1
cd basis && $(MAKE) clean
cd doc/manual && $(MAKE) clean
cd kitlib && $(CLEAN) run
cd ml-yacc-lib && $(CLEAN)
cd kitdemo && $(CLEAN) run */*~
cd test && $(MAKE) clean
cd test_dev && $(MAKE) clean
cd src && $(MAKE) clean
$(MAKE) -C js clean
.PHONY: clean_mlb
clean_mlb:
find . -name "MLB" -type d | xargs rm -Rf
.PHONY: install_kitdemo
install_kitdemo:
$(MKDIR) $(DATADIR)/kitdemo
$(MKDIR) $(DATADIR)/kitdemo/utils
$(INSTALLDATA) kitdemo/Makefile kitdemo/*.{sml,sig,mlb,c} $(DATADIR)/kitdemo
$(INSTALLDATA) kitdemo/utils/*.{sml,mlb} $(DATADIR)/kitdemo/utils
.PHONY: install_basis
install_basis:
$(MKDIR) $(LIBDIR)/basis
$(MKDIR) $(LIBDIR)/basis/io
$(INSTALLDATA) -p basis/*.{sml,sig,mlb} $(LIBDIR)/basis
$(INSTALLDATA) -p basis/io/*.{sml,sig} $(LIBDIR)/basis/io
test -n "`ls -1 basis/* | grep '.log'`" && $(INSTALLDATA) -p basis/*.log $(LIBDIR)/basis
test -n "`ls -1 basis/io/* | grep '.log'`" && $(INSTALLDATA) -p basis/io/*.log $(LIBDIR)/basis/io
.PHONY: install_man
install_man:
$(MKDIR) $(MANDIR)
$(MKDIR) $(MANDIR)/man1
$(INSTALLDATA) man/man1/*.1 $(MANDIR)/man1
.PHONY: install_license
install_license:
$(MKDIR) $(DATADIR)/doc/$(KIND)/license
$(INSTALLDATA) doc/license/{GPL-LICENSE,MLKit-LICENSE,MLton-LICENSE,SMLNJ-LIB-LICENSE,SMLNJ-LICENSE,CODEMIRROR-LICENSE} $(DATADIR)/doc/$(KIND)/license
.PHONY: install_top
install_top:
$(MKDIR) $(INSTDIR)
$(MKDIR) $(BINDIR)
$(INSTALLDATA) Makefile Makefile.in $(INSTDIR)
$(INSTALLDATA) Makefiledefault $(INSTDIR)
$(INSTALL) mkinstalldirs configure $(INSTDIR)
$(MAKE) install_basis
.PHONY: install_runtime
install_runtime:
$(MKDIR) $(LIBDIR)/lib
$(INSTALLDATA) lib/runtimeSystem.a $(LIBDIR)/lib
$(INSTALLDATA) lib/runtimeSystemProf.a $(LIBDIR)/lib
$(INSTALLDATA) lib/runtimeSystemGC.a $(LIBDIR)/lib
$(INSTALLDATA) lib/runtimeSystemGCProf.a $(LIBDIR)/lib
$(INSTALLDATA) lib/runtimeSystemGenGC.a $(LIBDIR)/lib
$(INSTALLDATA) lib/runtimeSystemGenGCProf.a $(LIBDIR)/lib
$(INSTALLDATA) lib/runtimeSystemPar.a $(LIBDIR)/lib
.PHONY: install_include
install_include:
$(MKDIR) $(DATADIR)/include
$(INSTALLDATA) src/Runtime/*.h $(DATADIR)/include
.PHONY: install0
install0:
$(MKDIR) $(INSTDIR)
$(MKDIR) $(BINDIR)
$(INSTALL) bin/mlkit $(BINDIR)
$(INSTALL) bin/reml $(BINDIR)
$(INSTALL) bin/mlkit-mllex $(BINDIR)
$(INSTALL) bin/mlkit-mlyacc $(BINDIR)
$(INSTALL) bin/rp2ps $(BINDIR)
$(INSTALL) bin/kittester $(BINDIR)
$(MKDIR) $(LIBDIR)
$(MKDIR) $(LIBDIR)/mlkit
$(MAKE) install_runtime LIBDIR=$(LIBDIR)/mlkit
$(MAKE) install_basis LIBDIR=$(LIBDIR)/mlkit
$(MAKE) install_mlkit_basislibs LIBDIR=$(LIBDIR)/mlkit
$(MKDIR) $(MANDIR)
$(MKDIR) $(MANDIR)/man1
$(INSTALLDATA) man/man1/mlkit.1 $(MANDIR)/man1
$(INSTALLDATA) man/man1/reml.1 $(MANDIR)/man1
$(INSTALLDATA) man/man1/mlkit-mllex.1 $(MANDIR)/man1
$(INSTALLDATA) man/man1/mlkit-mlyacc.1 $(MANDIR)/man1
$(INSTALLDATA) man/man1/rp2ps.1 $(MANDIR)/man1
$(INSTALLDATA) man/man1/kittester.1 $(MANDIR)/man1
$(MKDIR) $(DATADIR)/mlkit
$(MAKE) install_kitdemo DATADIR=$(DATADIR)/mlkit
$(MAKE) install_test DATADIR=$(DATADIR)/mlkit
$(MAKE) install_include DATADIR=$(DATADIR)/mlkit
$(MKDIR) $(DATADIR)/doc
$(MKDIR) $(DATADIR)/doc/mlkit
$(MAKE) install_license KIND=mlkit
$(INSTALLDATA) doc/mlkit.pdf $(DATADIR)/doc/mlkit/
$(INSTALLDATA) src/Tools/ml-lex/mllex.pdf $(DATADIR)/doc/mlkit/
$(INSTALLDATA) src/Tools/ml-yacc/doc/mlyacc.pdf $(DATADIR)/doc/mlkit/
$(INSTALLDATA) NEWS.md $(DATADIR)/doc/mlkit/
.PHONY: install
install:
$(MAKE) install0
$(MKDIR) $(SYSCONFDIR)/mlkit
if [ -e $(SYSCONFDIR)/mlkit/mlb-path-map ]; \
then true; \
else echo "SML_LIB $(exec_prefix)/lib/mlkit" > $(SYSCONFDIR)/mlkit/mlb-path-map; \
fi
.PHONY: install_test
install_test:
$(MKDIR) $(DATADIR)/test
$(MKDIR) $(DATADIR)/test/mlyacc $(DATADIR)/test/ray $(DATADIR)/test/nucleic $(DATADIR)/test/danwang
$(MKDIR) $(DATADIR)/test/barnes-hut $(DATADIR)/test/logic
$(MKDIR) $(DATADIR)/test/DATA $(DATADIR)/test/LEXGEN_DATA $(DATADIR)/test/VLIW_DATA
$(MKDIR) $(DATADIR)/test/ray/DATA $(DATADIR)/test/mlyacc/DATA
$(INSTALL) test/Makefile $(DATADIR)/test
$(INSTALL) test/Makefile test/*.{tst,sml,sig,mlb,out.ok,log.ok,txt,c} $(DATADIR)/test
$(INSTALL) test/README $(DATADIR)/test
$(INSTALL) test/VLIW_DATA/*.s $(DATADIR)/test/VLIW_DATA
$(INSTALL) test/ray/DATA/TEST $(DATADIR)/test/ray/DATA
$(INSTALL) test/ray/input test/ray/README test/ray/load test/ray/*.{sml,mlb} $(DATADIR)/test/ray
$(INSTALL) test/nucleic/MAIL test/nucleic/*.{sml,mlb,tex,bbl} $(DATADIR)/test/nucleic
$(INSTALL) test/danwang/*.{sml,sig,mlb} $(DATADIR)/test/danwang
$(INSTALL) test/barnes-hut/*.{sml,mlb} test/barnes-hut/load test/barnes-hut/README $(DATADIR)/test/barnes-hut
$(INSTALL) test/logic/*.{sml,mlb} $(DATADIR)/test/logic
cd $(DATADIR)/test && rm -f testlink testcycl testbadl hardlinkA hardlinkB
cd $(DATADIR)/test && ln -sf README testlink
cd $(DATADIR)/test && ln -sf testcycl testcycl
cd $(DATADIR)/test && ln -sf exists.not testbadl
cd $(DATADIR)/test && echo -e 'hardlinkA' >> hardlinkA
cd $(DATADIR)/test && ln -f hardlinkA hardlinkB
.PHONY: install_src
install_src:
$(MKDIR) $(INSTDIR)/src
$(MKDIR) $(INSTDIR)/src/Common $(INSTDIR)/src/Compiler $(INSTDIR)/src/Manager $(INSTDIR)/src/Kitlib $(INSTDIR)/src/Pickle
$(MKDIR) $(INSTDIR)/src/CUtils $(INSTDIR)/src/Edlib $(INSTDIR)/src/Parsing $(INSTDIR)/src/Runtime
$(MKDIR) $(INSTDIR)/src/Tools
$(MKDIR) $(INSTDIR)/src/lib
$(MKDIR) $(INSTDIR)/src/lib/github.com
$(MKDIR) $(INSTDIR)/src/lib/github.com/diku-dk
$(MKDIR) $(INSTDIR)/src/lib/github.com/diku-dk/sml-uref
$(MKDIR) $(INSTDIR)/src/Common/EfficientElab
$(MKDIR) $(INSTDIR)/src/Compiler/Backend $(INSTDIR)/src/Compiler/Lambda $(INSTDIR)/src/Compiler/Regions
$(MKDIR) $(INSTDIR)/src/Compiler/Backend/Barry $(INSTDIR)/src/Compiler/Backend/Dummy
$(MKDIR) $(INSTDIR)/src/Compiler/Backend/X64
$(MKDIR) $(INSTDIR)/src/Tools/Benchmark $(INSTDIR)/src/Tools/MlbMake $(INSTDIR)/src/Tools/Rp2ps
$(MKDIR) $(INSTDIR)/src/Tools/Tester $(INSTDIR)/src/Tools/MspComp
$(INSTALLDATA) src/Makefile src/*.{sml,in} $(INSTDIR)/src
$(INSTALLDATA) src/lib/github.com/diku-dk/sml-uref/*.{mlb,sig,sml} $(INSTDIR)/src/lib/github.com/diku-dk/sml-uref
$(INSTALLDATA) src/Common/*.{mlb,sig,sml} $(INSTDIR)/src/Common
$(INSTALLDATA) src/Common/EfficientElab/*.sml $(INSTDIR)/src/Common/EfficientElab
$(INSTALLDATA) src/Compiler/*.{mlb,sig,sml} $(INSTDIR)/src/Compiler
$(INSTALLDATA) src/Compiler/Lambda/*.{sig,sml} $(INSTDIR)/src/Compiler/Lambda
$(INSTALLDATA) src/Compiler/Regions/*.{sig,sml} $(INSTDIR)/src/Compiler/Regions
$(INSTALLDATA) src/Compiler/Backend/*.sml $(INSTDIR)/src/Compiler/Backend
$(INSTALLDATA) src/Compiler/Backend/Barry/*.sml $(INSTDIR)/src/Compiler/Backend/Barry
$(INSTALLDATA) src/Compiler/Backend/Dummy/*.sml $(INSTDIR)/src/Compiler/Backend/Dummy
$(INSTALLDATA) src/Compiler/Backend/X64/*.sml $(INSTDIR)/src/Compiler/Backend/X64
$(INSTALLDATA) src/Manager/*.{sml,sig,mlb} $(INSTDIR)/src/Manager
$(INSTALLDATA) src/Kitlib/*.{sml,sig,mlb} $(INSTDIR)/src/Kitlib
$(INSTALLDATA) src/Pickle/*.{sml,sig,mlb} $(INSTDIR)/src/Pickle
$(INSTALLDATA) src/CUtils/Makefile src/CUtils/*.{c,h} $(INSTDIR)/src/CUtils
$(INSTALLDATA) src/Edlib/Makefile src/Edlib/*.{sml,sig,mlb} $(INSTDIR)/src/Edlib
$(INSTALLDATA) src/Parsing/*.{sml,sig,grm,lex} $(INSTDIR)/src/Parsing
$(INSTALLDATA) src/Runtime/Makefile src/Runtime/*.{c,h,in} $(INSTDIR)/src/Runtime
$(INSTALLDATA) src/Tools/Benchmark/*.{sml,mlb} src/Tools/Benchmark/Makefile $(INSTDIR)/src/Tools/Benchmark
$(INSTALLDATA) src/Tools/MlbMake/*.{sml,sig,mlb,in} src/Tools/MlbMake/Makefile $(INSTDIR)/src/Tools/MlbMake
$(INSTALLDATA) src/Tools/Rp2ps/*.{c,h,in} src/Tools/Rp2ps/Makefile $(INSTDIR)/src/Tools/Rp2ps
$(INSTALLDATA) src/Tools/Tester/*.{sml,mlb,in} src/Tools/Tester/Makefile $(INSTDIR)/src/Tools/Tester
$(INSTALLDATA) src/Tools/MspComp/*.sml src/Tools/MspComp/Makefile $(INSTDIR)/src/Tools/MspComp
.PHONY: bootstrap0
bootstrap0: install_test install_src
$(INSTALL) bin/kittester $(BINDIR)
.PHONY: bootstrap_first
bootstrap_first:
$(MAKE) install_top
$(MAKE) install_runtime
$(INSTALL) bin/{mlkit,rp2ps} $(BINDIR)
$(MAKE) bootstrap0
MLKIT_FLAGS ?=
MLKIT_BUILD_LOG ?= native64.log
.PHONY: bootstrap_next_build
bootstrap_next_build:
cd src/Compiler && SML_LIB=$(CWD) $(TIMECMD) ../../bin/mlkit $(MLKIT_FLAGS) -gc native64.mlb \
2>&1 | tee $(MLKIT_BUILD_LOG)
.PHONY: bootstrap_next_install
bootstrap_next_install:
$(MAKE) install_top
$(MAKE) install_runtime
$(INSTALL) bin/{rp2ps,kittester} $(BINDIR)
$(INSTALL) src/Compiler/run $(BINDIR)/mlkit
$(MAKE) install_test
$(MAKE) install_src
.PHONY: bootstrap_next
bootstrap_next:
$(MAKE) bootstrap_next_build
$(MAKE) bootstrap_next_install
.PHONY: bootstrap
bootstrap:
$(MKDIR) bootstrap
$(CLEAN) bootstrap/mlkit-v1
$(MAKE) bootstrap_first INSTDIR=bootstrap/mlkit-v1 DATADIR=bootstrap/mlkit-v1 LIBDIR=bootstrap/mlkit-v1 \
MANDIR=bootstrap/mlkit-v1/man BINDIR=bootstrap/mlkit-v1/bin
$(CLEAN) bootstrap/mlkit-v2
$(MAKE) -C bootstrap/mlkit-v1 bootstrap_next INSTDIR=../mlkit-v2 DATADIR=../mlkit-v2 LIBDIR=../mlkit-v2 \
MANDIR=../mlkit-v2/man BINDIR=../mlkit-v2/bin
$(CLEAN) bootstrap/mlkit-v3
$(MAKE) -C bootstrap/mlkit-v2 bootstrap_next INSTDIR=../mlkit-v3 DATADIR=../mlkit-v3 LIBDIR=../mlkit-v3 \
MANDIR=../mlkit-v3/man BINDIR=../mlkit-v3/bin
$(STRIP) bootstrap/mlkit-v2/bin/mlkit
$(STRIP) bootstrap/mlkit-v3/bin/mlkit
if $(DIFF) -s bootstrap/mlkit-v2/bin/mlkit bootstrap/mlkit-v3/bin/mlkit ; then true; else false; fi
$(INSTALL) bootstrap/mlkit-v3/bin/mlkit bin/mlkit
.PHONY: man_mlkit
man_mlkit:
$(MKDIR) man/man1
SML_LIB=$(exec_prefix)/lib/mlkit bin/mlkit -man > man/man1/mlkit.1
SML_LIB=$(exec_prefix)/lib/reml bin/reml -man > man/man1/reml.1
.PHONY: man_smltojs
man_smltojs:
$(MKDIR) man/man1
SML_LIB=$(exec_prefix)/lib/smltojs bin/smltojs -man > man/man1/smltojs.1
.PHONY: man_barry
man_barry:
$(MKDIR) man/man1
SML_LIB=$(exec_prefix)/lib/barry bin/barry -man > man/man1/barry.1
.PHONY: install_barry0
install_barry0:
$(MKDIR) $(INSTDIR)
$(MKDIR) $(BINDIR)
$(INSTALL) bin/barry $(BINDIR)
$(MKDIR) $(LIBDIR)/barry
# $(MAKE) install_barry_basislibs LIBDIR=$(LIBDIR)/barry
$(MAKE) install_kitdemo DATADIR=$(DATADIR)/barry
$(MKDIR) $(MANDIR)/man1
$(INSTALLDATA) man/man1/barry.1 $(MANDIR)/man1
$(MKDIR) $(INSTDIR)/share/doc/barry
$(MAKE) install_license KIND=barry
$(INSTALLDATA) doc/mlkit.pdf $(DATADIR)/doc/barry
$(INSTALLDATA) README_BARRY.md $(DATADIR)/doc/barry
.PHONY: install_barry
install_barry: install_barry0
$(MKDIR) $(SYSCONFDIR)/barry
if [ -e $(SYSCONFDIR)/barry/mlb-path-map ]; \
then true; \
else echo "SML_LIB $(exec_prefix)/lib/barry" > $(SYSCONFDIR)/barry/mlb-path-map; \
fi
.PHONY: install_smltojs0
install_smltojs0:
$(MKDIR) $(INSTDIR)
$(MKDIR) $(BINDIR)
$(INSTALL) bin/smltojs $(BINDIR)
$(MKDIR) $(LIBDIR)/smltojs
$(MAKE) install_smltojs_basislibs LIBDIR=$(LIBDIR)/smltojs
$(INSTALLDATA) js/prims.js $(LIBDIR)/smltojs
$(MKDIR) $(MANDIR)/man1
$(INSTALLDATA) man/man1/smltojs.1 $(MANDIR)/man1
$(MKDIR) $(INSTDIR)/share/doc/smltojs
$(MAKE) install_license KIND=smltojs
$(INSTALLDATA) README_SMLTOJS.md $(DATADIR)/doc/smltojs
$(MKDIR) $(INSTDIR)/share/smltojs/test
$(INSTALLDATA) js/test/*.{sml,sig,mlb,png,gif} $(INSTDIR)/share/smltojs/test
.PHONY: install_smltojs
install_smltojs: install_smltojs0
$(MKDIR) $(SYSCONFDIR)/smltojs
if [ -e $(SYSCONFDIR)/smltojs/mlb-path-map ]; \
then true; \
else echo "SML_LIB $(exec_prefix)/lib/smltojs" > $(SYSCONFDIR)/smltojs/mlb-path-map; \
fi
# -----------------------------------------------------
# Target for building MLKit binary package. The target
# assumes that the mlkit has been build using
# $ ./autobuild
# $ ./configure
# $ make all
# -----------------------------------------------------
MLKIT_DIST_BIN=mlkit-$(KITVERSION)-x64
.PHONY: mlkit_x64_tgz
mlkit_x64_tgz:
$(MKDIR) dist
rm -rf dist/$(MLKIT_DIST_BIN)
$(MAKE) install0 DESTDIR=$(CWD)/dist/$(MLKIT_DIST_BIN) prefix=
(cd dist && tar czvf $(MLKIT_DIST_BIN).tgz $(MLKIT_DIST_BIN))
# -----------------------------------------------------
# Target for building SMLtoJs binary package. The target
# assumes that smltojs has been build using
# $ ./autobuild
# $ ./configure
# $ make smltojs
# $ make smltojs_basislibs
# -----------------------------------------------------
SMLTOJS_DIST_BIN=smltojs-$(KITVERSION)-x64
.PHONY: smltojs_x64_tgz
smltojs_x64_tgz:
$(MKDIR) dist
rm -rf dist/$(SMLTOJS_DIST_BIN)
$(MAKE) install_smltojs0 DESTDIR=$(CWD)/dist/$(SMLTOJS_DIST_BIN) prefix=
(cd dist && tar czvf $(SMLTOJS_DIST_BIN).tgz $(SMLTOJS_DIST_BIN))
# -----------------------------------------------------
# Target for building binary distribution for both
# mlkit and smltojs. Assumes the following
# $ ./autobuild
# $ ./configure
# $ make mlkit
# $ make reml
# $ make mlkit_libs
# $ make smltojs
# $ make smltojs_basislibs
# -----------------------------------------------------
OS=$(shell uname -s | tr '[:upper:]' '[:lower:]')
BIN_DIST=mlkit-bin-dist-$(OS)
.PHONY: mlkit_bin_dist
mlkit_bin_dist:
$(MKDIR) dist
rm -rf dist/$(BIN_DIST)
$(MAKE) install0 DESTDIR=$(CWD)/dist/$(BIN_DIST) prefix=
$(MAKE) install_smltojs0 DESTDIR=$(CWD)/dist/$(BIN_DIST) prefix=
echo 'PREFIX?=/usr/local' > $(CWD)/dist/$(BIN_DIST)/Makefile
echo '.PHONY: install' >> $(CWD)/dist/$(BIN_DIST)/Makefile
echo 'install:' >> $(CWD)/dist/$(BIN_DIST)/Makefile
printf "\t"'for d in $$$$(find * -type d); do install -d "$$(PREFIX)/$$$$d"; done\n' \
>> $(CWD)/dist/$(BIN_DIST)/Makefile
printf "\t"'for f in $$$$(find * -type f | grep -v ^Makefile); do install -p "$$$$f" "$$(PREFIX)/$$$$f"; done\n' \
>> $(CWD)/dist/$(BIN_DIST)/Makefile
(cd dist && tar czf $(BIN_DIST).tgz $(BIN_DIST))
.PHONY: test
test:
$(MAKE) -C test_dev test
$(MAKE) -C test test_mlkit
$(MAKE) -C test test_mlkit_no_gc
$(MAKE) -C test/explicit_regions all
$(MAKE) -C test/parallelism all