From: Gabor Greif Date: Tue, 18 Mar 2008 07:03:00 +0000 (+0000) Subject: add 'clean' targets, make sure that 'make test' works after 'make clean' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17feadf7529d7017588d716accc3717ccf2739f2;p=clang add 'clean' targets, make sure that 'make test' works after 'make clean' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48488 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Makefile b/test/Makefile index 85267558b7..f1629784e6 100644 --- a/test/Makefile +++ b/test/Makefile @@ -12,3 +12,8 @@ all:: PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts \ find $(TESTDIRS) \( -name '*.c' -or -name '*.cpp' -or -name '*.m' \) \ -print -exec ./TestRunner.sh {} \; + +clean:: + rm -rf Output/ + +.PHONY: all clean diff --git a/test/Makefile.parallel b/test/Makefile.parallel index adb3cf35d1..e627b1c14d 100644 --- a/test/Makefile.parallel +++ b/test/Makefile.parallel @@ -25,6 +25,7 @@ Output/%.testresults: % @ PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts ./TestRunner.sh $< > $@ || $(REPORTFAIL) all:: + @ mkdir -p $(addprefix Output/, $(TESTDIRS)) @ rm -f $(TESTS) @ echo '--- Running clang tests ---' @ $(MAKE) -f Makefile.parallel $(TESTS) @@ -33,4 +34,7 @@ all:: report: $(TESTS) @ cat $^ -.PHONY: all report +clean:: + rm -rf Output/ + +.PHONY: all report clean