diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-01-26 09:52:49 -0600 |
---|---|---|
committer | Jonathan Nieder <jrnieder@gmail.com> | 2010-01-26 10:08:55 -0600 |
commit | dfea575017ddc2ae7c9e8dcb978f4557f07715d3 (patch) | |
tree | 9e1e30e1fe6accd016c8be2b892044148f3acacc /.gitignore | |
parent | c373991375a4903dbb9bea69e2ce11ce819253e2 (diff) | |
download | git-dfea575017ddc2ae7c9e8dcb978f4557f07715d3.tar.gz |
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 <jrnieder@gmail.com>
Diffstat (limited to '.gitignore')
-rw-r--r-- | .gitignore | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index 8df8f88bea..7b3acb7664 100644 --- a/.gitignore +++ b/.gitignore @@ -177,6 +177,7 @@ *.exe *.[aos] *.py[co] +*.o.d *+ /config.mak /autom4te.cache |