Add a clean rule

This commit is contained in:
Adam Sampson 2006-10-17 21:57:24 +00:00
parent 5cb2b2d248
commit a2cf9c0939

View File

@ -1,4 +1,6 @@
all: fco
targets = fco
all: $(targets)
sources = \
AST.hs \
@ -14,12 +16,12 @@ sources = \
SExpression.hs \
PTToAST.hs
fco: $(sources)
$(targets): $(sources)
ghc -fglasgow-exts -o fco --make Main
tests = $(wildcard testcases/*.occ)
test: fco $(tests)
test: $(targets) $(tests)
@set -e; for x in $(tests); do \
echo -n "$$x: " ; \
if ! ./fco --parse-tree $$x >$$x.log 2>&1 ; then \
@ -30,3 +32,7 @@ test: fco $(tests)
echo "ok" ; \
fi ; \
done
clean:
rm -f $(targets) *.o *.hi