fix(tests/playground/Makefile): fixes

This commit is contained in:
Sebastian Ullrich 2019-05-15 17:57:25 +02:00
parent a831ce85d7
commit 9cdcb99008

View file

@ -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 = $() $()