Re: [PATCH] Makefile: make COMPUTE_HEADER_DEPENDENCIES=auto work with DEVOPTS=pedantic
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 23, 2021, 17:41 UTC
- Message-ID
- <xmqqpmsz196b.fsf@gitster.g>
- In-Reply-To
- <YUypOEywhzEWpoef@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 21 quoted lines
> On Wed, Sep 22, 2021 at 05:03:58PM -0700, Junio C Hamano wrote: > >> Jeff King <peff@peff.net> writes: >> >> > I almost suggested using "git.c" as the dummy file, since we know it >> > must compile anyway. But that probably has other problems (it's more >> > expensive, and if it _does_ have an error, the results may be >> > confusing). >> > >> > It's a shame we can't just try to do the _real_ compiles using the >> > auto-dependency stuff, and then fall back if they fail. But I think >> > there's a chicken-and-egg problem there with "make" doing real work, and >> > figuring out the dependencies to do real work. >> >> Yeah, if compiling any of the real sources is inexpensive enough, I >> would think that would be the happy way to go. Do we have a trivial >> source that almost never changes? Perhaps version.c (especially if >> we kick out two helper functions that do not really belong there)? > > Perhaps. TBH, I find Ævar's latest patch to just add -Wno-pedantic to be > the simplest and most obviously-correct fix.
Yes, that is very much to-the-point. If we have trouble with being pedantic, forcing us not to be is a fine solution ;-)