Chris Lattner | 15dd75c | 2003-01-17 23:25:24 +0000 | [diff] [blame] | 1 | ##===- test/Programs/TEST.jit.Makefile ---------------------*- Makefile -*-===## |
| 2 | # |
| 3 | # This test tries running the Just-In-Time compiler on all of the programs to |
| 4 | # see which ones work and which ones don't. It provides a report to tabulate |
| 5 | # this nicely and provides some simple statistics. |
| 6 | # |
| 7 | ##===----------------------------------------------------------------------===## |
| 8 | |
Chris Lattner | 1280b45 | 2003-06-16 15:52:21 +0000 | [diff] [blame] | 9 | JIT_OPTS = -force-interpreter=false -stats -time-passes |
Chris Lattner | 3ea9f04 | 2003-01-21 15:39:15 +0000 | [diff] [blame] | 10 | CURDIR := $(shell cd .; pwd) |
| 11 | PROGDIR := $(shell cd $(LEVEL)/test/Programs; pwd)/ |
| 12 | RELDIR := $(subst $(PROGDIR),,$(CURDIR)) |
Chris Lattner | 15dd75c | 2003-01-17 23:25:24 +0000 | [diff] [blame] | 13 | |
| 14 | $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \ |
Chris Lattner | a3e819d | 2003-01-21 16:33:08 +0000 | [diff] [blame] | 15 | Output/%.$(TEST).report.txt: Output/%.llvm.bc $(LLI) |
Chris Lattner | 1280b45 | 2003-06-16 15:52:21 +0000 | [diff] [blame] | 16 | -(time -p $(LLI) $(JIT_OPTS) $< $(RUN_OPTIONS) > /dev/null \ |
| 17 | < $(STDIN_FILENAME)) > $@ 2>&1 |
Chris Lattner | 15dd75c | 2003-01-17 23:25:24 +0000 | [diff] [blame] | 18 | |
| 19 | $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \ |
| 20 | test.$(TEST).%: Output/%.$(TEST).report.txt |
| 21 | @echo "---------------------------------------------------------------" |
Chris Lattner | 3ea9f04 | 2003-01-21 15:39:15 +0000 | [diff] [blame] | 22 | @echo ">>> ========= '$(RELDIR)/$*' Program" |
Chris Lattner | 15dd75c | 2003-01-17 23:25:24 +0000 | [diff] [blame] | 23 | @echo "---------------------------------------------------------------" |
| 24 | @cat $< |
| 25 | |
| 26 | # Define REPORT_DEPENDENCIES so that the report is regenerated if lli changes |
| 27 | # |
Chris Lattner | a3e819d | 2003-01-21 16:33:08 +0000 | [diff] [blame] | 28 | REPORT_DEPENDENCIES := $(LLI) |