「make check」「make clean」の修正
authorj8takagi <j8takagi@nifty.com>
Mon, 25 Jan 2010 23:47:37 +0000 (08:47 +0900)
committerj8takagi <j8takagi@nifty.com>
Mon, 25 Jan 2010 23:47:37 +0000 (08:47 +0900)
「make check」は、常にすべての統合テストを実行
「make clean」は、常にソースとテストのディレクトリをクリア
err.txtをクリアするよう修正

Makefile
test/integration/Makefile
test/integration/casl2/TEST.mk

index 2797559..21b5232 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,12 @@
 prefix = $(HOME)
 prefix = $(HOME)
+CLEANDIR = src test/integration test/unit
 .PHPNY: all clean check install uninstall
 all:
        make -C src
 check:
 .PHPNY: all clean check install uninstall
 all:
        make -C src
 check:
-       make -C test/integration
+       make -sC test/integration
 clean:
 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; \
 install: all
        @if test -d $(prefix); then \
        install -s ./casl2 $(prefix)/casl2; \
index b696573..e440002 100644 (file)
@@ -1,6 +1,7 @@
 YACASL2DIR=../..
 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
index e33df44..1f1dad3 100644 (file)
@@ -12,7 +12,7 @@ UNITNAME = `pwd | xargs basename`
 check: clean report.txt
 prepare: cleanall 0.txt
 clean:
 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)
 cleanall: clean
        @rm -f 0.txt
 0.txt 1.txt: $(CASL2) $(ASFILE)