From a2cf9c0939032f68abeb880d1617a412c8d1fccb Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Tue, 17 Oct 2006 21:57:24 +0000 Subject: [PATCH] Add a clean rule --- fco/Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fco/Makefile b/fco/Makefile index 489a3ed..d803f87 100644 --- a/fco/Makefile +++ b/fco/Makefile @@ -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 +