path: root/.gitignore
diff options
authorJonathan Nieder <>2010-01-26 15:52:49 (GMT)
committerJonathan Nieder <>2010-01-26 16:08:55 (GMT)
commitdfea575017ddc2ae7c9e8dcb978f4557f07715d3 (patch)
tree9e1e30e1fe6accd016c8be2b892044148f3acacc /.gitignore
parentc373991375a4903dbb9bea69e2ce11ce819253e2 (diff)
Makefile: lazily compute header dependencies
Use the gcc -MMD -MP -MF options to generate dependency rules as a byproduct when building .o files if the COMPUTE_HEADER_DEPENDENCIES variable is defined. That variable is left undefined by default for now. As each object file is built, write a makefile fragment containing its dependencies in the deps/ subdirectory of its containing directory. The deps/ directories should be generated if they are missing at the start of each build. So let each object file depend on $(missing_dep_dirs), which lists only the directories of this kind that are missing to avoid needlessly regenerating files when the directories' timestamps change. gcc learned the -MMD -MP -MF options in version 3.0, so most gcc users should have them by now. The dependencies this option computes are more specific than the rough estimates hard-coded in the Makefile, greatly speeding up rebuilds when only a little-used header file has changed. Signed-off-by: Jonathan Nieder <>
Diffstat (limited to '.gitignore')
1 files changed, 1 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 8df8f88..7b3acb7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -177,6 +177,7 @@