-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·52 lines (43 loc) · 1.39 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
all:
@echo "CM-Lex for Standard ML (cmlex):"
@echo "Run 'make smlnj' or 'make mlton' on Linux/Unix/OSX."
@echo "Run 'make win+smlnj' in Windows."
@echo "In Smackage, then run 'make install' to install."
@echo ""
@echo "CM-Lex for Haskell (cmlex-hs):"
@echo "Run 'make smlnj+hs' or 'make mlton+hs' on Linux/Unix/OSX."
@echo "Run 'make win+smlnj+hs' in Windows."
@echo "In Smackage, then run 'make install+hs' to install."
# MLton
.PHONY : mlton
mlton:
mlton -output bin/cmlex cmlex.mlb
.PHONY : mlton+hs
mlton+hs:
mlton -output bin/cmlex-hs cmlex-hs.mlb
# SML/NJ
.PHONY : smlnj
smlnj:
sml export-smlnj.sml
bin/mknjexec-unixey `which sml` `pwd`/bin cmlex-heapimg cmlex
.PHONY : smlnj+hs
smlnj+hs:
sml export-smlnj-hs.sml
bin/mknjexec-unixey `which sml` `pwd`/bin cmlex-hs-heapimg cmlex-hs
# Windows + SML/NJ
.PHONY : win+smlnj
win+smlnj:
sml export-smlnj.sml
bin/mknjexec-win `which sml` `pwd`/bin cmlex-heapimg.x86-win32 cmlex
.PHONY : win+smlnj+hs
win+smlnj+hs:
sml export-smlnj-hs.sml
bin/mknjexec-win `which sml` `pwd`/bin cmlex-hs-heapimg.x86-win32 cmlex-hs
install:
rm -f $(DESTDIR)/bin/cmlex.new
cp bin/cmlex $(DESTDIR)/bin/cmlex.new
mv $(DESTDIR)/bin/cmlex.new $(DESTDIR)/bin/cmlex
install+hs:
rm -f $(DESTDIR)/bin/cmlex-hs.new
cp bin/cmlex $(DESTDIR)/bin/cmlex-hs.new
mv $(DESTDIR)/bin/cmlex-hs.new $(DESTDIR)/bin/cmlex-hs