]> granicus.if.org Git - clang/commitdiff
Get rid of the creation of secondary makefile "Makefile.tests".
authorGabor Greif <ggreif@gmail.com>
Mon, 17 Mar 2008 15:37:09 +0000 (15:37 +0000)
committerGabor Greif <ggreif@gmail.com>
Mon, 17 Mar 2008 15:37:09 +0000 (15:37 +0000)
This implements second part of
<http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080310/004727.html>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48456 91177308-0d34-0410-b5e6-96231b3b80d8

test/Makefile.parallel

index 28daebf0b37c63fb41278c15311ab4f361621482..c110edb6088a0123104420b5cf9e41a04a0d9287 100644 (file)
@@ -10,34 +10,22 @@ endif
 
 TESTS = $(addsuffix .testresults, $(shell find $(TESTDIRS) \( -name '*.c' -or -name '*.cpp' -or -name '*.m' \)))
 
-Makefile.tests:
-       @ echo '%.testresults: %' > $@
-       @ echo "^@ printf '.'" | tr "^" "\t" >> $@
-       @ echo "^@ PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts ./TestRunner.sh &< > &@ || (echo; echo '----' &! 'failed ----')" | tr '^!&' '\t^$$' >> $@
-       @ echo >> $@
-       @ echo "TESTS = $(TESTS)" >> $@
-       @ echo '  ' >> $@
-       @ echo >> $@
-       @ echo "all:: &(TESTS)" | tr "&" '$$' >> $@
-       @ echo >> $@
-       @ echo "report: &(TESTS)" | tr "&" '$$' >> $@
-       @ echo "^@ cat $$<" | tr "^&<" "\t$$^" >> $@
-       @ echo >> $@
-       @ echo "clean:" | tr "&" '$$' >> $@
-       @ echo "^@ rm -f &(TESTS)" | tr "^&<" "\t$$^" >> $@
-       @ echo >> $@
-       @ echo ".PHONY: all report clean" >> $@
-
-all:: Makefile.tests
+%.testresults: %
+       @ printf '.'
+       @ PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts ./TestRunner.sh $< > $@ || (echo; echo '----' $< 'failed ----')
+
+all::
        @ echo '--- Running clang tests ---'
-       @ $(MAKE) -f $< clean
-       @ $(MAKE) -f $< all
-       @ echo "^@ echo" | tr "^" "\t" >> $@
-       @ $(MAKE) -f $< report
-       @ $(MAKE) -f $< clean
-       @ rm $<
+       @ $(MAKE) -f Makefile.parallel testclean
+       @ $(MAKE) -f Makefile.parallel $(TESTS)
+       @ echo
+       @ $(MAKE) -f Makefile.parallel report
+       @ $(MAKE) -f Makefile.parallel testclean
 
-.PHONY: all
+report: $(TESTS)
+       @ cat $^
 
-.NOTPARALLEL:
+testclean:
+       @ rm -f $(TESTS)
 
+.PHONY: all report testclean