aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Pierre Letouzey <pierre.letouzey@inria.fr>2016-06-06 20:46:45 +0200
committerGravatar Pierre Letouzey <pierre.letouzey@inria.fr>2016-06-08 14:37:36 +0200
commitf2a2bf8322222ecc4a4b384a510ab00c377f6fb7 (patch)
tree21691e12640415e78b37ab86419c6015571aac59
parent0c112c91d6a4756bacc19b12a8c2351053093fb4 (diff)
Makefile: avoid overwriting test.ml when testing grammar.cma
-rw-r--r--Makefile.build10
1 files changed, 4 insertions, 6 deletions
diff --git a/Makefile.build b/Makefile.build
index fc92507e6..7edc62028 100644
--- a/Makefile.build
+++ b/Makefile.build
@@ -207,8 +207,7 @@ kernel/copcodes.ml: kernel/byterun/coq_instruct.h
## Explicit dependencies for grammar stuff
GRAMBASEDEPS := grammar/gramCompat.cmo grammar/q_util.cmi
-GRAMCMO := \
- grammar/gramCompat.cmo grammar/q_util.cmo \
+GRAMCMO := grammar/gramCompat.cmo grammar/q_util.cmo \
grammar/argextend.cmo grammar/tacextend.cmo grammar/vernacextend.cmo
grammar/q_util.cmi : grammar/gramCompat.cmo
@@ -227,10 +226,9 @@ GRAMC := $(OCAMLFIND) ocamlc $(CAMLFLAGS) $(CAMLDEBUG) $(USERFLAGS) \
grammar/grammar.cma : $(GRAMCMO)
$(SHOW)'Testing $@'
- @touch test.mlp
- $(HIDE)$(CAMLP4O) -I $(MYCAMLP4LIB) $^ -impl test.mlp -o test.ml
- $(HIDE)$(GRAMC) test.ml -o test-grammar
- @rm -f test-grammar test.*
+ @touch grammar/test.mlp
+ $(HIDE)$(GRAMC) -pp '$(CAMLP4O) -I $(MYCAMLP4LIB) $^ -impl' -impl grammar/test.mlp -o grammar/test
+ @rm -f grammar/test.* grammar/test
$(SHOW)'OCAMLC -a $@'
$(HIDE)$(GRAMC) $^ -linkall -a -o $@