Lazily generate header dependencies
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest5 patches 1 replyIn review
- v12 patches 6 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | Makefile: rearrange dependency rulesMakefile | +13 | 0 replies | |
| 2/5 | Makefile: clear list of default rulesMakefile | +2 | 0 replies | |
| 3/5 | Makefile: add OBJECTS variable listing object filesMakefile | +20 | 0 replies | |
| 4/5 | Makefile: lazily compute header dependencies.gitignore Makefile | +37 | 0 replies | |
| 5/5 | Teach Makefile to check header dependenciesMakefile | +67 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/5] Lazily generate header dependencies
Quoted 3 lines · Nanako Shiraishi
Junio, could you tell us what happened to this thread?
Makefileimprovements. No discussion.
My bad. The previous version was very rough because I was not sure yet how this could help in making the header dependency rules more maintainable. If all compilers worth using support something like gcc's -MD option (does MSVC?), we could switch over completely; otherwise, we need some way to use the generated dependencies to check the static ones, or the static ones will go stale.
That is, maybe something like this. With these patches applied, running
echo COMPUTE_HEADER_DEPENDENCIES=YesPlease >> config.mak make clean
make
make CHECK_HEADER_DEPENDENCIES=YesPlease
will fail unless the dependency rules in the Makefile account for all #includes gcc noticed with the current configuration.
Patch 5 is a little rough around the edges, but I am hoping it will convey the idea.
Enjoy,
Jonathan Nieder (5):
Makefile: rearrange dependency rules
Makefile: clear list of default rules
Makefile: list generated object files in OBJECTS macro
Makefile: lazily compute header dependencies Teach Makefile to check header dependencies
.gitignore | 1 + Makefile | 158 +++++++++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 130 insertions(+), 29 deletions(-)