-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
32 lines (26 loc) · 960 Bytes
/
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
all: \
.cabal-sandbox/bin/elm-basic-compile.jsexe/out.js \
dist/elm-basic-compile.js
elm-compiler:
git clone https://github.com/elm-lang/elm-compiler.git
cd elm-compiler && git checkout 0.18.0 && patch -p1 < ../patch/elm-compiler.diff
elm-package:
git clone https://github.com/elm-lang/elm-package.git
cd elm-package && git checkout 0.18.0 && patch -p1 < ../patch/elm-package.diff
.cabal-sandbox: elm-compiler elm-package
cabal sandbox init
cabal sandbox add-source .
cabal sandbox add-source elm-compiler
cabal sandbox add-source elm-package
.cabal-sandbox/bin/elm-basic-compile.jsexe/out.js: .cabal-sandbox src/*.hs
cabal install -j elm-basic-compile
dist/elm-basic-compile.js: src/*.hs js/export.js
cat \
js/prelude.js \
.cabal-sandbox/bin/elm-basic-compile.jsexe/rts.js \
.cabal-sandbox/bin/elm-basic-compile.jsexe/lib.js \
.cabal-sandbox/bin/elm-basic-compile.jsexe/out.js \
js/export.js \
> $@
clean:
rm -rf .cabal-sandbox