-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
114 lines (89 loc) · 2.76 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
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
TSLCHECK=tslcheck
TSLSIZE=tslsize
TSLSYM=tslsym
TSLRESOLVE=tslresolve
TSL2TLSF=tsl2tlsf
TSL2TOML=tsl2toml
TSLSPLIT=tslsplit
TSLPLAY=tslplay
CFMCHECK=cfmcheck
CFMINFO=cfminfo
CFMSYM=cfmsym
CFM2CODE=cfm2code
TSLCOREGEN=tslcoregen
TSLMINREAL=tslminrealizable
TOOLS=\
${TSLCHECK}\
${TSLSIZE}\
${TSLSYM}\
${TSLRESOLVE}\
${TSL2TLSF}\
${TSL2TOML}\
${TSLSPLIT}\
${TSLPLAY}\
${CFMCHECK}\
${CFMINFO}\
${CFMSYM}\
${CFM2CODE}\
${TSLCOREGEN}\
${TSLMINREAL}
STACKPATH=$(shell if [ -d "dist" ]; then echo ""; else stack path | grep local-install-root | sed 's/local-install-root: //'; fi)
BLDTOOL=$(shell if [ -d "dist" ]; then echo "cabal"; else echo "stack"; fi)
default:
${BLDTOOL} build
@for i in ${TOOLS}; do if [ -d "dist" ]; then cp ./dist/build/$${i}/$${i} $${i}; else cp ${STACKPATH}/bin/$${i} $${i}; fi; done
${TSLCHECK}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
${TSLSIZE}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
${TSLSYM}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
${TSLRESOLVE}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
${TSLSPLIT}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
${TSL2TLSF}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
${TSL2TOML}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
${CFMCHECK}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
${CFMINFO}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
${CFMSYM}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
${CFM2CODE}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
${TSLPLAY}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
${TSLCOREGEN}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
${TSLMINREAL}:
${BLDTOOL} build :$@
@if [ -d "dist" ]; then cp ./dist/build/$@/$@ $@; else cp ${STACKPATH}/bin/$@ $@; fi
install:
${BLDTOOL} install
test:
${BLDTOOL} test
doc:
${BLDTOOL} haddock --open
format:
stylish-haskell -c .stylish-haskell.yaml -i -r src/
clean:
${BLDTOOL} clean
@for i in ${TOOLS}; do rm -f $${i}; done
.PHONY: install test doc format clean ${TOOLS}
.SILENT: