blob: 37d35abc9e3bd507e3d563fa7d2d6eda132d79e0 [file] [log] [blame]
Chris Lattner15dd75c2003-01-17 23:25:24 +00001##===- 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 Lattner1280b452003-06-16 15:52:21 +00009JIT_OPTS = -force-interpreter=false -stats -time-passes
Chris Lattner3ea9f042003-01-21 15:39:15 +000010CURDIR := $(shell cd .; pwd)
11PROGDIR := $(shell cd $(LEVEL)/test/Programs; pwd)/
12RELDIR := $(subst $(PROGDIR),,$(CURDIR))
Chris Lattner15dd75c2003-01-17 23:25:24 +000013
14$(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
Chris Lattnera3e819d2003-01-21 16:33:08 +000015Output/%.$(TEST).report.txt: Output/%.llvm.bc $(LLI)
Chris Lattner1280b452003-06-16 15:52:21 +000016 -(time -p $(LLI) $(JIT_OPTS) $< $(RUN_OPTIONS) > /dev/null \
17 < $(STDIN_FILENAME)) > $@ 2>&1
Chris Lattner15dd75c2003-01-17 23:25:24 +000018
19$(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
20test.$(TEST).%: Output/%.$(TEST).report.txt
21 @echo "---------------------------------------------------------------"
Chris Lattner3ea9f042003-01-21 15:39:15 +000022 @echo ">>> ========= '$(RELDIR)/$*' Program"
Chris Lattner15dd75c2003-01-17 23:25:24 +000023 @echo "---------------------------------------------------------------"
24 @cat $<
25
26# Define REPORT_DEPENDENCIES so that the report is regenerated if lli changes
27#
Chris Lattnera3e819d2003-01-21 16:33:08 +000028REPORT_DEPENDENCIES := $(LLI)