「make check」は、常にすべての統合テストを実行
「make clean」は、常にソースとテストのディレクトリをクリア
err.txtをクリアするよう修正
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; \
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
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)