git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/5] Lazily generate header dependencies

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 7, 2010, 07:13 UTC
Message-ID
<20100107071305.GA11777@progeny.tock>
In-Reply-To
<20100101090550.6117@nanako3.lavabit.com>
Nanako Shiraishi wrote:
> Junio, could you tell us what happened to this thread?
> 
> Makefile improvements.  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(-)
Previous: Jonathan NiederNext: Jonathan Nieder
Message 21 of 28 in “Makefile: determine the list of header files using a glob”
  1. Makefile: determine the list of header files using a globJohannes Sixt, Nov 27, 2009
  2. Mike HommeyNov 27, 2009
  3. Johannes SixtNov 27, 2009
  4. Mike HommeyNov 27, 2009
  5. Junio C HamanoNov 27, 2009
  6. Mike HommeyDec 30, 2009
  7. Junio C HamanoDec 30, 2009
  8. Johannes SchindelinNov 27, 2009
  9. 0/2 Lazily generate header dependenciesJonathan Nieder, Nov 27, 2009
  10. 1/2 Makefile: use target-specific variable to pass flags to ccJonathan Nieder, Nov 27, 2009
  11. 2/2 Makefile: automatically compute header dependenciesJonathan Nieder, Nov 27, 2009
  12. Sverre RabbelierNov 27, 2009
  13. Jonathan NiederNov 28, 2009
  14. 2/2 Makefile: lazily compute header dependenciesJonathan Nieder, Nov 28, 2009
  15. Andreas SchwabNov 28, 2009
  16. Jonathan NiederNov 28, 2009
  17. Nanako ShiraishiJan 1, 2010
  18. Junio C HamanoJan 6, 2010
  19. Johannes SchindelinJan 6, 2010
  20. Jonathan NiederJan 6, 2010
  21. 0/5 Lazily generate header dependenciesJonathan Nieder, Jan 7, 2010
  22. 1/5 Makefile: rearrange dependency rulesJonathan Nieder, Jan 7, 2010
  23. 2/5 Makefile: clear list of default rulesJonathan Nieder, Jan 7, 2010
  24. 3/5 Makefile: add OBJECTS variable listing object filesJonathan Nieder, Jan 7, 2010
  25. 4/5 Makefile: lazily compute header dependenciesJonathan Nieder, Jan 7, 2010
  26. 5/5 Teach Makefile to check header dependenciesJonathan Nieder, Jan 7, 2010
  27. Erik Faye-LundJan 7, 2010
  28. Junio C HamanoNov 27, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.