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

Re: [PATCH resend] Makefile: Use computed header dependencies if the compiler supports it

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 18, 2011, 18:41 UTC
Message-ID
<20110818184142.GF30436@elie.gateway.2wire.net>
In-Reply-To
<20110818183439.GA21560@fredrik-Q430-Q530>
Fredrik Kuivinen wrote:
> Oh, I missed "--help". But for me gcc always exits with status code 0
> when I give it "--help", regardless of what other flags I
> provide. Therefore, I don't see how "--help" can be used to test for
> support of -MMD.
Ah, my mistake.  Good catch.
> Here is an updated patch. It avoids the ++empty.c file by giving "-x
> c" to the compiler.
Much nicer, thanks!
> It also avoids the auto-detection when
> COMPUTE_HEADER_DEPENDENCIES is set

Unfortunately "ifdef" in Makefiles means "if nonempty", so the overhead of detection is still there if I want to explicitly disable COMPUTE_HEADER_DEPENDENCIES. That's okay, since that overhead is small. So for what it's worth,

Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Previous: Fredrik Kuivinen
Message 6 of 6 in “Makefile: Use computed header dependencies if the compiler supports it”
  1. Makefile: Use computed header dependencies if the compiler supports itFredrik Kuivinen, Aug 14, 2011
  2. Jonathan NiederAug 14, 2011
  3. Fredrik KuivinenAug 14, 2011
  4. Jonathan NiederAug 14, 2011
  5. Fredrik KuivinenAug 18, 2011
  6. Jonathan NiederAug 18, 2011

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.