-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
55 lines (40 loc) · 1.64 KB
/
Makefile
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
.PHONY: Main.main
default: smlnj
all: smlnj mlton
mlton: main
FILES = $(shell ruby generate-file-list.rb Makefile)
main: main.mlb $(FILES)
mlyacc sexp/sexp.grm
mllex sexp/sexp.lex
mlyacc parser/timl.grm
mllex parser/timl.lex
mlyacc parser/etiml.grm
mllex parser/etiml.lex
time ./format-mlton.rb mlton $(MLTON_FLAGS) -default-ann "'nonexhaustiveMatch error'" -default-ann "'redundantMatch error'" main.mlb
main.mlb: generate-file-list.rb
ruby generate-file-list.rb mlton > main.mlb
profile:
mlprof -show-line true -raw true main mlmon.out
smlnj: main.cm $(FILES)
time ./format.rb ml-build -Ccontrol.poly-eq-warn=false -Ccompiler-mc.error-non-exhaustive-match=true -Ccompiler-mc.error-non-exhaustive-bind=true main.cm Main.main main-image
main.cm: generate-file-list.rb
./generate-file-list.rb smlnj > main.cm
# unit-test: main.cm $(FILES)
# time ./format.rb ml-build -Ccontrol.poly-eq-warn=false -Ccompiler-mc.error-non-exhaustive-match=true -Ccompiler-mc.error-non-exhaustive-bind=true main.cm UnitTestMain.main main-image
unit-test-bin: unit-test.mlb $(FILES)
time ./format-mlton.rb mlton $(MLTON_FLAGS) -default-ann "'nonexhaustiveMatch error'" -default-ann "'redundantMatch error'" -output unit-test-bin unit-test.mlb
unit-test.mlb: generate-file-list.rb
ruby generate-file-list.rb mlton unit-test > unit-test.mlb
%.t.sml: %.sml
cp $< $@
# cat $< | ruby preprocess.rb > $@
# sed -i '1i(* Auto-generated. Do not edit! *)' $@
ex -sc '1i|(* Auto-generated. Do not edit! *)' -cx file
clean:
find . -type f ! -name '*.exe' | xargs touch
rm -f main
rm -f main-image*
rm -f main.cm
rm -f main.mlb
rm -f unit-test.mlb
print-% : ; @echo $* = $($*)