New bench target in root Makefile

bench/Makefile now builds the test utility if not already built
This commit is contained in:
Guillaume Bury 2014-11-05 23:00:23 +01:00
parent 51f5a00224
commit a31285d3ad
2 changed files with 16 additions and 11 deletions

View file

@ -25,6 +25,9 @@ test: $(TEST)
$(TEST): $(LIB)
$(COMP) $(FLAGS) $(DIRS) $(TEST)
bench: $(TEST)
cd bench && $(MAKE)
log:
cat _build/$(LOG) || true
@ -43,4 +46,4 @@ reinstall: all
ocamlfind remove msat || true
ocamlfind install msat $(TO_INSTALL)
.PHONY: clean doc all install uninstall reinstall
.PHONY: clean doc all bench install uninstall reinstall

View file

@ -1,25 +1,27 @@
SOLVER :=../sat_solve.native
OPTIONS :=-t 30s -s 1G
LOGDIR := $(shell echo "logs/`git rev-parse HEAD`")
LOGDIRE := $(shell echo "logs\/`git rev-parse HEAD`")
INDEX := $(shell echo "$(LOGDIR)/index")
LOGDIR := $(shell echo "./logs/`git rev-parse HEAD`")
INDEX := $(shell echo "./$(LOGDIR)/index")
CNF := $(shell find -L ./ -name "*.cnf" -type f)
DONE := $(addprefix $(LOGDIR)/raw/, $(CNF:.cnf=.done))
PROVER := $(shell echo "$(LOGDIR)/prover")
PROVER := $(shell echo "./$(LOGDIR)/prover")
CMD := $(PROVER) $(OPTIONS)
all: $(INDEX)
@echo "All done."
$(INDEX): $(PROVER) $(DONE)
@echo "Ended at `date +'%H:%M:%S %d/%m/%Y'`" > $(INDEX)
@echo "Index created"
@echo "Bench ended for commit `git rev-parse HEAD`" | tee -a $(INDEX)
@echo "Ended at `date +'%H:%M:%S %d/%m/%Y'`" | tee -a $(INDEX)
$(PROVER):
@echo "Creating log directory..." && mkdir -p $(LOGDIR)/raw
@echo "Copying prover..." && cp $(SOLVER) $(PROVER)
$(PROVER): $(SOLVER)
@mkdir -p $(LOGDIR)/raw
@cp $(SOLVER) $(PROVER)
@echo "Bench started for commit `git rev-parse HEAD`"
$(SOLVER):
cd .. && $(MAKE)
$(LOGDIR)/raw/%.done : $(PROVER)
@mkdir -p $(dir $@)