Add a clean rule
This commit is contained in:
parent
5cb2b2d248
commit
a2cf9c0939
12
fco/Makefile
12
fco/Makefile
|
@ -1,4 +1,6 @@
|
||||||
all: fco
|
targets = fco
|
||||||
|
|
||||||
|
all: $(targets)
|
||||||
|
|
||||||
sources = \
|
sources = \
|
||||||
AST.hs \
|
AST.hs \
|
||||||
|
@ -14,12 +16,12 @@ sources = \
|
||||||
SExpression.hs \
|
SExpression.hs \
|
||||||
PTToAST.hs
|
PTToAST.hs
|
||||||
|
|
||||||
fco: $(sources)
|
$(targets): $(sources)
|
||||||
ghc -fglasgow-exts -o fco --make Main
|
ghc -fglasgow-exts -o fco --make Main
|
||||||
|
|
||||||
tests = $(wildcard testcases/*.occ)
|
tests = $(wildcard testcases/*.occ)
|
||||||
|
|
||||||
test: fco $(tests)
|
test: $(targets) $(tests)
|
||||||
@set -e; for x in $(tests); do \
|
@set -e; for x in $(tests); do \
|
||||||
echo -n "$$x: " ; \
|
echo -n "$$x: " ; \
|
||||||
if ! ./fco --parse-tree $$x >$$x.log 2>&1 ; then \
|
if ! ./fco --parse-tree $$x >$$x.log 2>&1 ; then \
|
||||||
|
@ -30,3 +32,7 @@ test: fco $(tests)
|
||||||
echo "ok" ; \
|
echo "ok" ; \
|
||||||
fi ; \
|
fi ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(targets) *.o *.hi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user