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

Re: [PATCH v2 4/4] Makefile: emulate compile in $(HCO) target better

From
Jeff King <peff@peff.net>
Date
Oct 2, 2019, 15:41 UTC
Message-ID
<20191002154131.GB6116@sigill.intra.peff.net>
In-Reply-To
<14def72319521d7380fb6a8ec570d014c0f5361b.1569398897.git.liu.denton@gmail.com>
On Wed, Sep 25, 2019 at 01:21:01AM -0700, Denton Liu wrote:
Show 11 quoted lines
> Fix these problems by emulating the compile process better, including
> test compiling dummy *.hcc C sources generated from the *.h files and
> passing $(ALL_CFLAGS) into the compiler for the $(HCO) target so that
> these custom flags can be used.
> 
> Helped-by: Jeff King <peff@peff.net>
> Signed-off-by: Denton Liu <liu.denton@gmail.com>
> ---
> 
> Peff, thanks for the suggestion! I modified it a little bit so that we
> wouldn't have to keep regenerating the *.hcc files unnecessarily.

What you have here looks good. I doubt it matters too much compared to the cost of the compiler, but having them in their own rule makes it easier to follow, I think.

> I also considered piping into the compiler's stdin directly which I know
> works for GCC (and _probably_ Clang) but I opted against it because I'm
> not sure it's portable for other compilers. Maybe it's alright for this
> to be less portable since it's a developer target?

Yeah, I'd worry slightly about portability. But it would be nice to avoid generating more cruft. And I agree that most people running this would be developers. Maybe it would make sense to float a separate patch on top (that would make it easy to revert if somebody runs into a problem).

Thanks for working on this (and the whole series looks good, including the commit message changes you made regarding the bitmap code).

-Peff
Previous: Denton LiuNext: Johannes Schindelin
Message 17 of 18 in “fixes related to `make hdr-check`”
  1. 0/3 fixes related to `make hdr-check`Denton Liu, Sep 23, 2019
  2. 1/3 Makefile: use $(ALL_CFLAGS) in $(HCO) targetDenton Liu, Sep 23, 2019
  3. Johannes SchindelinSep 26, 2019
  4. Denton LiuSep 26, 2019
  5. Johannes SchindelinSep 26, 2019
  6. Junio C HamanoSep 28, 2019
  7. 2/3 apply.h: include missing headerDenton Liu, Sep 23, 2019
  8. 3/3 promisor-remote.h: include missing headerDenton Liu, Sep 23, 2019
  9. 4/3 pack-bitmap.h: fix unused variable warningDenton Liu, Sep 24, 2019
  10. Jeff KingSep 24, 2019
  11. Jeff KingSep 24, 2019
  12. 0/4 fixes related to `make hdr-check`Denton Liu, Sep 25, 2019
  13. 1/4 apply.h: include missing headerDenton Liu, Sep 25, 2019
  14. 2/4 promisor-remote.h: include missing headerDenton Liu, Sep 25, 2019
  15. 3/4 pack-bitmap.h: remove magic numberDenton Liu, Sep 25, 2019
  16. 4/4 Makefile: emulate compile in $(HCO) target betterDenton Liu, Sep 25, 2019
  17. Jeff KingOct 2, 2019
  18. Johannes SchindelinSep 26, 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.