diff --git a/tests/playground/Makefile b/tests/playground/Makefile index 118adbdfcb..e53ba77a39 100644 --- a/tests/playground/Makefile +++ b/tests/playground/Makefile @@ -12,11 +12,13 @@ OCAML_FLAGS = -O3 ## IMPLEMENTATION +CROSS_INPUTS = $(foreach bench,$(CROSS_BENCHES), $(foreach cat, $(CROSS_CATS), $(bench)$(cat))) + LEAN_BIN ?= ../../bin GHC ?= ghc OCAML ?= ocamlopt.opt -.PRECIOUS: %.lean.out %.hs.out %.ml.out bench/% +.SECONDARY: $(CROSS_INPUTS:%=%.out) $(CROSS_INPUTS:%=bench/%.bench) .DELETE_ON_ERROR: all: report_cross.csv @@ -33,25 +35,25 @@ all: report_cross.csv # x.gcc.lean. This also avoids conflicts between intermediate # files of the two binaries. %.gcc.lean.out: LEAN_BIN = $(LEAN_GCC_BIN) -%.gcc.lean: %.lean; ln $< $@ +%.gcc.lean: %.lean; ln -f $< $@ %.hs.out: %.hs $(GHC) $(GHC_FLAGS) -rtsopts $< -o $@ %.llvm.hs.out: GHC_FLAGS += -fllvm -%.llvm.hs: %.hs; ln $< $@ +%.llvm.hs: %.hs; ln -f $< $@ -binarytrees.hs: binarytrees.ghc-6.hs; ln $< $@ +binarytrees.hs: binarytrees.ghc-6.hs; ln -f $< $@ # NOTE: changed `-N4` rtsopt to `-N` to be less system-dependent binarytrees%hs.out: GHC_FLAGS += --make -O2 -XBangPatterns -dynamic -threaded -rtsopts -with-rtsopts='-N -K128M -H' %.ml.out: %.ml $(OCAML) $(OCAML_FLAGS) $< -o $@ %.gc.ml.out: OCAML_FLAGS += -runtime-variant i -%.gc.ml: %.ml; ln $< $@ +%.gc.ml: %.ml; ln -f $< $@ %.flambda.ml.out: OCAML = $(OCAML_FLAMBDA) -%.flambda.ml: %.ml; ln $< $@ +%.flambda.ml: %.ml; ln -f $< $@ -binarytrees.ml: binarytrees.ocaml-2.ml; ln $< $@ +binarytrees.ml: binarytrees.ocaml-2.ml; ln -f $< $@ binarytrees%ml.out: OCAML_FLAGS += -noassert -unsafe -fPIC -nodynlink -inline 100 -O3 unix.cmxa bench: @@ -74,7 +76,7 @@ bench/%gc.ml.bench: %gc.ml.out | bench bench/binarytrees.gc.ml.bench: touch $@ -bench_cross: $(foreach bench,$(CROSS_BENCHES), $(foreach cat, $(CROSS_CATS), bench/$(bench)$(cat).bench)) +bench_cross: $(CROSS_INPUTS:%=bench/%.bench) # yes. space = $() $()