Fix file mode.
[llvm-testsuite.git] / TEST.libcalls.Makefile
blobaadf72c4c24a7126c635e71f01c549fe2fc6e32a
1 ##===- TEST.libcalls.Makefile ------------------------------*- Makefile -*-===##
3 # This recursively traverses the programs, and runs the -simplify-libcalls pass
4 # on each *.linked.rbc bytecode file with -stats set so that it is possible to
5 # determine which libcalls are being optimized in which programs.
6
7 # Usage: 
8 #     make TEST=libcalls summary (short summary)
9 #     make TEST=libcalls (detailed list with time passes, etc.)
10 #     make TEST=libcalls report
11 #     make TEST=libcalls report.html
13 ##===----------------------------------------------------------------------===##
15 CURDIR  := $(shell cd .; pwd)
16 PROGDIR := $(PROJ_SRC_ROOT)
17 RELDIR  := $(subst $(PROGDIR),,$(CURDIR))
19 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
20 test.$(TEST).%: Output/%.$(TEST).report.txt
21         @cat $<
23 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt):  \
24 Output/%.$(TEST).report.txt: Output/%.linked.rbc $(LOPT) \
25         $(PROJ_SRC_ROOT)/TEST.libcalls.Makefile 
26         $(VERB) $(RM) -f $@
27         @echo "---------------------------------------------------------------" >> $@
28         @echo ">>> ========= '$(RELDIR)/$*' Program" >> $@
29         @echo "---------------------------------------------------------------" >> $@
30         @-$(LOPT) -simplify-libcalls -stats -debug-only=simplify-libcalls \
31                  -time-passes -disable-output $< 2>>$@ 
32 summary:
33         @$(MAKE) TEST=libcalls | egrep '======|simplify-libcalls -'
35 .PHONY: summary
36 REPORT_DEPENDENCIES := $(LOPT)