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>