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

Re: [PATCH] Update hard-coded header dependencies

From
Jeff King <peff@peff.net>
Date
Aug 10, 2014, 19:48 UTC
Message-ID
<20140810194824.GC9886@peff.net>
In-Reply-To
<20140808215825.GH12427@google.com>
On Fri, Aug 08, 2014 at 02:58:26PM -0700, Jonathan Nieder wrote:
Show 8 quoted lines
> Maybe it's worth switching to plain
> 
> 	LIB_H += $(wildcard *.h)
> 
> ?  People using ancient compilers that never change headers wouldn't
> be hurt, people using modern compilers that do change headers also
> wouldn't be hurt, and we could stop pretending to maintain an
> up-to-date list.

Yeah, I think that makes sense. I'd imagine most of the developers are on a modern platform and don't use the static list at all, so we don't notice when it breaks (and even when you do use it, it's quite hard to notice anyway).

We'd have to do a multi-directory wildcard, though, to catch the header files stuck in compat/* and elsewhere. We could list the containing directories manually, but that's yet another thing to go wrong. For people using the git repo, it would probably be fine to do:

  LIB_H += $(shell git ls-files -- '*.h')

That wouldn't count new files a developer adds until they "git add" some version of the file, but that is not so bad (right now they have to add it to the Makefile, and anyway, I think most devs are using the computed dependencies).

But that doesn't work for distributed tarballs, which would have to convert that to a static list somehow. Maybe

  LIB_H += $(shell find . -name '*.h' -print)
would work?
-Peff
Previous: Jonathan NiederNext: Jeff King
Message 2 of 27 in “Update hard-coded header dependencies”
  1. Update hard-coded header dependenciesJonathan Nieder, Aug 8, 2014
  2. Jeff KingAug 10, 2014
  3. Jeff KingAug 21, 2014
  4. 1/2 Makefile: use "find" to determine static header dependenciesJeff King, Aug 21, 2014
  5. Jonathan NiederAug 21, 2014
  6. Jeff KingAug 22, 2014
  7. 0/3 dropping manually-maintained LIB_HJeff King, Aug 22, 2014
  8. 1/3 i18n: treat "make pot" as an explicitly-invoked targetJeff King, Aug 22, 2014
  9. 2/3 Makefile: use `find` to determine static header dependenciesJeff King, Aug 22, 2014
  10. Junio C HamanoAug 25, 2014
  11. Jeff KingAug 25, 2014
  12. Jonathan NiederAug 25, 2014
  13. Jeff KingAug 25, 2014
  14. Jeff KingAug 25, 2014
  15. Jonathan NiederAug 25, 2014
  16. Junio C HamanoAug 25, 2014
  17. Jonathan NiederAug 25, 2014
  18. Junio C HamanoAug 25, 2014
  19. Jeff KingAug 26, 2014
  20. Junio C HamanoAug 26, 2014
  21. Jeff KingAug 26, 2014
  22. Junio C HamanoAug 26, 2014
  23. 3/3 Makefile: drop CHECK_HEADER_DEPENDENCIES codeJeff King, Aug 22, 2014
  24. Jiang XinAug 23, 2014
  25. 2/2 Makefile: drop CHECK_HEADER_DEPENDENCIES codeJeff King, Aug 21, 2014
  26. Junio C HamanoAug 10, 2014
  27. Junio C HamanoAug 10, 2014

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.