aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlmamane2007-07-16 07:25:08 +0000
committerlmamane2007-07-16 07:25:08 +0000
commit89610407b332cf93181791f0877be16913cae748 (patch)
treeaa5c708562754cc045fd32e599b0ed41c4874c2b
parenta3c4febd0141b7283a03d643f06e1f8cd9750276 (diff)
makefile: dependencies of .c files: assume missing headers are generated files
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10004 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--Makefile.build6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.build b/Makefile.build
index 7f79c60c97..fdd65f9f46 100644
--- a/Makefile.build
+++ b/Makefile.build
@@ -853,9 +853,13 @@ 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
$(SHOW)'CCDEP $<'
- $(HIDE)$(CC) -MM $(CFLAGS) $(CINCLUDES) $< > $@
+ $(HIDE)$(CC) -MM -MG $(CFLAGS) $(CINCLUDES) $< > $@
.PRECIOUS: %.ml %.mli %.d %.ml4.d kernel/copcodes.ml