aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlmamane2007-07-16 11:19:29 +0000
committerlmamane2007-07-16 11:19:29 +0000
commitdc60d228b1bcb3c88f797bb0d97d5828da8605fd (patch)
tree6bb3b88ea857d92130519196612ec253fee48562
parenta964a7da07af0921ce173c4ef2f89fc80609366c (diff)
Makefile: -MG doesn't (and can't) do what is necessary
The -MG option causes gcc to add any non-found .h file verbatim in the dependencies. This naturally doesn't include the path to it (because the path is unknown) and thus make doesn't know how to build it; it knows how to build kernel/byterun/coq_jumptbl.h, not "coq_jumptbl.h". --This line, and those below, will be ignored-- M Makefile.common M Makefile.build git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10011 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--Makefile.build8
-rw-r--r--Makefile.common3
2 files changed, 4 insertions, 7 deletions
diff --git a/Makefile.build b/Makefile.build
index 38cdd53be6..7ef5f5a5cd 100644
--- a/Makefile.build
+++ b/Makefile.build
@@ -841,13 +841,9 @@ endif
$(HIDE)$(COQDEP) -coqlib . -R theories Coq -R contrib Coq $(COQINCLUDES) \
"$<" | sed 's/\(.*\)\.vo[[:space:]]*:/\1.vo \1.glob:/' > "$@"
-# The use of the -MG flag here presupposes that all generated C header
-# (.h) files do not themselves #include other (non-system) header files.
-# It this changes in future, then the calculation of the dependencies needs
-# to actually depend on the header files.
-%.c.d: %.c
+%.c.d: %.c | $(GENHFILES)
$(SHOW)'CCDEP $<'
- $(HIDE)$(CC) -MM -MG -MQ "$@" -MQ "$(<:.c=.o)" $(CFLAGS) $(CINCLUDES) $< > $@
+ $(HIDE)$(CC) -MM -MQ "$@" -MQ "$(<:.c=.o)" $(CFLAGS) $(CINCLUDES) $< > $@
.SECONDARY: $(GENFILES)
diff --git a/Makefile.common b/Makefile.common
index 3bf6ae5028..41603fef6b 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -432,7 +432,8 @@ LEXFILES := $(shell find . '(' -name '*.mll' ')' -printf '%P\n')
GENMLFILES:=$(LEXFILES:.mll=.ml) $(YACCFILES:.mly=.ml) \
scripts/tolink.ml kernel/copcodes.ml
GENMLIFILES:=$(YACCFILES:.mly=.mli)
-GENFILES:=$(GENMLFILES) $(GENMLIFILES) kernel/byterun/coq_jumptbl.h
+GENHFILES:=kernel/byterun/coq_jumptbl.h
+GENFILES:=$(GENMLFILES) $(GENMLIFILES) $(GENHFILES)
MLFILES := $(shell find . '(' -name '*.ml' ')' -printf '%P\n' | \
while read f; do if ! [ -e "$${f}4" ]; then echo "$$f"; fi; done) \
$(GENMLFILES)