summaryrefslogtreecommitdiff
path: root/test/Makefile
diff options
context:
space:
mode:
authorCamil Staps2017-11-26 13:35:48 +0100
committerCamil Staps2017-11-26 13:35:48 +0100
commit3b3752d5bd9c21f24072f6f6030938d85a48bc11 (patch)
tree4ec4a0b3856b9d985efde81e6c974ec18b54941e /test/Makefile
parentAdd Markov chain test (diff)
Cleanup
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/Makefile b/test/Makefile
index 3b9b4a7..ba62dab 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -7,21 +7,25 @@ AUX:=$(addsuffix .o, $(EXE) $(DEP))\
SRC:=$(addsuffix .hs,$(DEP))
GHC:=ghc
GHCFLAGS:=-O -main-is Test.main
+DATA:=dataset.pgn
-.PHONY=all data run clean
+.PHONY=all run clean
all: $(EXE)
-dataset.pgn:
+$(DATA):
for i in $$(seq 1000 1020); do wget -q http://www.theweekinchess.com/zips/twic$${i}g.zip; unzip -q twic$${i}g.zip; rm twic$${i}g.zip; done
cat twic*.pgn > $@
$(RM) twic*.pgn
-run: $(EXE)
- ./$(EXE) < dataset.pgn
+run: $(EXE) $(DATA)
+ ./$(EXE) < $(DATA)
$(EXE): %: %.hs $(SRC)
$(GHC) $(GHCFLAGS) $< -o $@
clean:
$(RM) $(EXE) $(AUX)
+
+distclean: clean
+ $(RM) $(DATA)