Re: [PATCH 01/11] doc: allow the user to provide ASCIIDOC_EXTRA
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- May 17, 2021, 10:53 UTC
- Message-ID
- <60a24b25499c0_126a0520823@natae.notmuch>
- In-Reply-To
- <YKIwDTQI3sBXu+7W@coredump.intra.peff.net>
Jeff King wrote:
> On Sat, May 15, 2021 at 07:13:48AM -0500, Felipe Contreras wrote: > > Jeff King wrote:
Show 10 quoted lines
> > > To go into further detail: usually we distinguish variables we use > > > internally from user-facing ones, and include the latter in the former. > > > I see a later patch wants to start passing ASCIIDOC_EXTRA on the > > > command-line, and we'd use two variables for that. > > > > Well, it's not exactly user-facing; it's only needed for doc-diff. > > It's meant for the caller of "make". Your proposed use is within > doc-diff, but any user running "make ASCIIDOC_EXTRA=foo" would see the > different behavior.
Yeah, they would, but I don't think it would be wrong behavior.
Show 5 quoted lines
> > Would TEST_ASCIIDOC_EXTRA make sense? > > I'd probably call it ASCIIDOC_FLAGS (like we have CFLAGS and LDFLAGS > that are meant for users to inform us of extra flags they'd like > passed).
Right, but Makefiles do override those, like:
override CFLAGS += -fPIC
Otherwise builds may fail.
> Of course that may not solve your problem in a sense; if you want > doc-diff to override it, then that might conflict with a theoretical > ASCIIDOC_FLAGS somebody set in their config.mak (but we really are in > the realm of hypothetical here).
Setting ASCIIDOC_FLAGS in config.mk would not override the user-supplied flags any more than setting them in the Makefile (they are virtually the same thing as one includes the other).
It's only if the user has `override ASCIIDOC_FLAGS` in config.mk that such a problem would arise. And that's really hypothetical.
Cheers.
-- Felipe Contreras