Get rid of the creation of secondary makefile "Makefile.tests".

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
diff --git a/test/Makefile.parallel b/test/Makefile.parallel
index 28daebf..c110edb 100644
--- a/test/Makefile.parallel
+++ b/test/Makefile.parallel
@@ -10,34 +10,22 @@
 
 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" >> $@
+%.testresults: %
+	@ printf '.'
+	@ PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts ./TestRunner.sh $< > $@ || (echo; echo '----' $< 'failed ----')
 
-all:: Makefile.tests
+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