From: j8takagi Date: Mon, 25 Jan 2010 23:47:37 +0000 (+0900) Subject: 「make check」「make clean」の修正 X-Git-Tag: v0.1~78 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=295dbb72582804dbceaa8078c1abe574c9772002;p=YACASL2.git 「make check」「make clean」の修正 「make check」は、常にすべての統合テストを実行 「make clean」は、常にソースとテストのディレクトリをクリア err.txtをクリアするよう修正 --- diff --git a/Makefile b/Makefile index 2797559..21b5232 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,12 @@ prefix = $(HOME) +CLEANDIR = src test/integration test/unit .PHPNY: all clean check install uninstall all: make -C src check: - make -C test/integration + make -sC test/integration clean: - make -C src clean - make -C test/integration clean - make -C test/unit clean + @for target in $(CLEANDIR); do $(MAKE) -sC $$target clean; done install: all @if test -d $(prefix); then \ install -s ./casl2 $(prefix)/casl2; \ diff --git a/test/integration/Makefile b/test/integration/Makefile index b696573..e440002 100644 --- a/test/integration/Makefile +++ b/test/integration/Makefile @@ -1,6 +1,7 @@ YACASL2DIR=../.. -TARGETS = casl2 comet2 dumpword -.PHONY: all -all:$(TARGETS) -%: $(YACASL2DIR)/% - $(MAKE) -kC $@ +TESTGROUPS = casl2 comet2 dumpword +.PHONY: all clean +all: + @for target in $(TESTGROUPS); do $(MAKE) -sC $$target; done +clean: + @for target in $(TESTGROUPS); do $(MAKE) -sC $$target clean; done diff --git a/test/integration/casl2/TEST.mk b/test/integration/casl2/TEST.mk index e33df44..1f1dad3 100644 --- a/test/integration/casl2/TEST.mk +++ b/test/integration/casl2/TEST.mk @@ -12,7 +12,7 @@ UNITNAME = `pwd | xargs basename` check: clean report.txt prepare: cleanall 0.txt clean: - @rm -f 1.txt diff.txt report.txt + @rm -f 1.txt diff.txt report.txt err.txt cleanall: clean @rm -f 0.txt 0.txt 1.txt: $(CASL2) $(ASFILE)