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

Re: [PATCH 1/1] Makefile: use `git ls-files` to list header files, if possible

From
Jeff King <peff@peff.net>
Date
Mar 3, 2019, 17:11 UTC
Message-ID
<20190303171141.GC23811@sigill.intra.peff.net>
In-Reply-To
<nycvar.QRO.7.76.6.1903022056500.45@tvgsbejvaqbjf.bet>
On Sat, Mar 02, 2019 at 08:57:57PM +0100, Johannes Schindelin wrote:
Show 25 quoted lines
> Hi Peff,
> 
> On Fri, 1 Mar 2019, Jeff King wrote:
> 
> > On Fri, Mar 01, 2019 at 04:36:19PM -0500, Jeff King wrote:
> > 
> > > > This has one notable consequence: we no longer include
> > > > `command-list.h` in `LIB_H`, as it is a generated file, not a
> > > > tracked one.
> > > 
> > > We should be able to add back $(GENERATED_H) as appropriate. I see you
> > > did it for the non-computed-dependencies case. Couldn't we do the same
> > > for $(LOCALIZED_C) and $(CHK_HDRS)?
> > 
> > Answering my own question somewhat: $(CHK_HDRS) explicitly ignores the
> > generated headers, so we wouldn't want to bother re-adding it there
> > anyway. Possibly $(LOCALIZED_C) would care, though. The generated file
> > does have translatable strings in it.
> 
> Yes, and it is defined thusly:
> 
> 	LOCALIZED_C = $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H)
> 
> So it does include the generated headers explictly anyway, with or without
> my patch.
Oops, I should have read the source more carefully before responding.
Is it worth mentioning in the commit message? I.e., something like:
   This has one notable consequence: we no longer include
   `command-list.h` in `LIB_H`, as it is a generated file, not a tracked
   one, but that is easily worked around. Of the three sites that use
   `LIB_H`, two (`LOCALIZED_C` and `CHK_HDRS`) already handle generated
   headers separately. In the third, the computed-dependency fallback,
   we can just add in a reference to $(GENERATED_H).
-Peff
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 9 of 31 in “Avoid calling find in the Makefile, if possible”
  1. 0/1 Avoid calling find in the Makefile, if possibleJohannes Schindelin via GitGitGadget, Mar 1, 2019
  2. 1/1 Makefile: use `git ls-files` to list header files, if possibleJohannes Schindelin via GitGitGadget, Mar 1, 2019
  3. Jeff KingMar 1, 2019
  4. Jeff KingMar 1, 2019
  5. Jeff KingMar 1, 2019
  6. Johannes SchindelinMar 2, 2019
  7. Jeff KingMar 3, 2019
  8. Johannes SchindelinMar 2, 2019
  9. Jeff KingMar 3, 2019
  10. Johannes SchindelinMar 2, 2019
  11. Jeff KingMar 3, 2019
  12. Ramsay JonesMar 3, 2019
  13. Johannes SchindelinMar 4, 2019
  14. Ramsay JonesMar 4, 2019
  15. Jeff KingMar 4, 2019
  16. Johannes SchindelinMar 4, 2019
  17. Jeff KingMar 4, 2019
  18. Junio C HamanoMar 5, 2019
  19. Johannes SchindelinMar 5, 2019
  20. Junio C HamanoMar 5, 2019
  21. Jeff KingMar 5, 2019
  22. Ramsay JonesMar 6, 2019
  23. Jeff KingMar 6, 2019
  24. Junio C HamanoMar 6, 2019
  25. compat/bswap: add include header guardsJeff King, Mar 6, 2019
  26. Junio C HamanoMar 6, 2019
  27. 0/1 Avoid calling find in the Makefile, if possibleJohannes Schindelin via GitGitGadget, Mar 4, 2019
  28. 1/1 Makefile: use `git ls-files` to list header files, if possibleJohannes Schindelin via GitGitGadget, Mar 4, 2019
  29. Ramsay JonesMar 4, 2019
  30. Ramsay JonesMar 4, 2019
  31. Jeff KingMar 4, 2019

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.