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