aboutsummaryrefslogtreecommitdiff
path: root/Makefile.build
diff options
context:
space:
mode:
authorPierre Letouzey2014-03-01 21:21:09 +0100
committerPierre Letouzey2014-03-02 20:00:03 +0100
commitf694544d016b085b3cd10007b9f7716ae2c3b022 (patch)
tree36a6dd3389db0151edc798d7aa91e95b6ea0b151 /Makefile.build
parent761316ea73ad23be898470caa1a7bf839fa4a12e (diff)
Makefile: the initial build of grammar.cma is now directory-driven
In last commit, we used grep to decide whether a .ml4 could be compiled during the initial phase of not. Instead, we now rely on a simpler directory dichotomy: - config lib kernel library pretyping interp parsing grammar are considered initial (and shouldn't contain grammar-dependent .ml4), see $(GRAMSRCDIRS) in Makefile.common - the grammar-dependent .ml4 could be in any other directories Currently, they are in: tactics toplevel plugins/*
Diffstat (limited to 'Makefile.build')
-rw-r--r--Makefile.build17
1 files changed, 12 insertions, 5 deletions
diff --git a/Makefile.build b/Makefile.build
index 760a4db720..f8895b2ed8 100644
--- a/Makefile.build
+++ b/Makefile.build
@@ -25,13 +25,20 @@ world: revision coq coqide documentation
include Makefile.common
include Makefile.doc
-# In a first phase, we restrict to the basic .ml4 (the ones without grammar.cma)
+MLFILES := $(MLSTATICFILES) $(GENMLFILES) $(ML4FILES:.ml4=.ml)
+
+# In a first phase (when BUILDGRAMMAR=1), we restrict the considered
+# files to some specific directories (up to grammar/), not considering
+# the grammar-dependent .ml4 (which are in tactics/ toplevel/ plugins/)
+
+GRAMONLY := $(addsuffix /%,$(GRAMSRCDIRS))
ifdef BUILDGRAMMAR
- MLFILES := $(MLSTATICFILES) $(GENMLFILES) $(ML4BASEFILES:.ml4=.ml)
- CURFILES := $(MLFILES) $(MLIFILES) $(ML4BASEFILES) grammar/grammar.mllib
+ CURSRCDIRS := $(GRAMSRCDIRS)
+ CURFILES := \
+ $(filter $(GRAMONLY), $(MLFILES) $(MLIFILES) $(ML4FILES)) grammar/grammar.mllib
else
- MLFILES := $(MLSTATICFILES) $(GENMLFILES) $(ML4FILES:.ml4=.ml)
+ CURSRCDIRS := $(SRCDIRS)
CURFILES := $(MLFILES) $(MLIFILES) $(ML4FILES) $(MLLIBFILES) $(CFILES) $(VFILES)
endif
@@ -91,7 +98,7 @@ BOOTCOQC=$(TIMER) $(COQTOPEXE) -boot $(COQOPTS) -compile
SHOW := $(if $(VERBOSE),@true "",@echo "")
HIDE := $(if $(VERBOSE),,@)
-LOCALINCLUDES=$(addprefix -I , $(SRCDIRS) )
+LOCALINCLUDES := $(addprefix -I , $(CURSRCDIRS) )
MLINCLUDES=$(LOCALINCLUDES) -I $(MYCAMLP4LIB)
OCAMLC := $(OCAMLC) $(CAMLFLAGS)