Revert "Replace build and clean scripts with a Makefile."
This reverts commit e944bda907f75c5d30be1d114d2ea9340f28cdfe.
Chris Pressey
10 months ago
0 | |
PROG=qlzqqlzuup
|
1 | |
|
2 | |
all: exe web
|
3 | |
|
4 | |
exe: bin/$(PROG).exe
|
5 | |
|
6 | |
bin/$(PROG).exe:
|
7 | |
ifeq (, $(shell command -v ghc 2>/dev/null))
|
8 | |
echo "ghc not found in PATH, skipping exe build"
|
9 | |
else
|
10 | |
(cd src && ghc --make Main.hs -o ../bin/$(PROG).exe)
|
11 | |
endif
|
12 | |
|
13 | |
web: demo/$(PROG).js
|
14 | |
|
15 | |
demo/$(PROG).js:
|
16 | |
ifeq (, $(shell command -v hastec 2>/dev/null))
|
17 | |
echo "hastec not found in PATH, skipping web build"
|
18 | |
else
|
19 | |
(cd src && hastec --make HasteMain.hs -o $(PROG).js && mv $(PROG).js ../demo/$(PROG).js)
|
20 | |
endif
|
21 | |
|
22 | |
clean:
|
23 | |
rm -f bin/$(PROG).exe demo/$(PROG).js
|
24 | |
find . -name '*.o' -exec rm {} \;
|
25 | |
find . -name '*.hi' -exec rm {} \;
|
26 | |
find . -name '*.jsmod' -exec rm {} \;
|
|
0 |
#!/bin/sh
|
|
1 |
|
|
2 |
PROG=qlzqqlzuup
|
|
3 |
|
|
4 |
if command -v ghc >/dev/null 2>&1; then
|
|
5 |
echo "building $PROG.exe with ghc"
|
|
6 |
(cd src && ghc --make Main.hs -o ../bin/$PROG.exe) || exit 1
|
|
7 |
else
|
|
8 |
echo "ghc not found, not building $PROG.exe"
|
|
9 |
fi
|
|
10 |
|
|
11 |
if command -v hastec >/dev/null 2>&1; then
|
|
12 |
echo "building $PROG.js with hastec"
|
|
13 |
(cd src && hastec --make HasteMain.hs -o $PROG.js && mv $PROG.js ../demo/$PROG.js) || exit 1
|
|
14 |
else
|
|
15 |
echo "hastec not found, not building $PROG.js"
|
|
16 |
fi
|
|
0 |
#!/bin/sh
|
|
1 |
|
|
2 |
rm -f src/*.hi src/*.o src/*.js src/*.jsmod bin/*.exe
|