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

Re: [PATCH 1/1] Makefile: improve SPARSE_FLAGS customisation

From
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Date
Feb 1, 2019, 22:48 UTC
Message-ID
<20190201224813.4vykjb4iud5j6xhz@ltop.local>
In-Reply-To
<xmqqmunfxjve.fsf@gitster-ct.c.googlers.com>
On Fri, Feb 01, 2019 at 01:46:13PM -0800, Junio C Hamano wrote:
Show 25 quoted lines
> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
> 
> > In order to enable greater user customisation of the SPARSE_FLAGS
> > variable, we introduce a new SP_EXTRA_FLAGS variable to use for
> > target specific settings. Without using the new variable, setting
> > the SPARSE_FLAGS on the 'make' command-line would also override the
> > value set by the target-specific rules in the Makefile (effectively
> > making them useless). In addition, we initialise the SPARSE_FLAGS
> > to the default (empty) value using a conditional assignment (?=).
> > This allows the SPARSE_FLAGS to be set from the environment as
> > well as from the command-line.
> 
> Thanks for a detailed and clear explanation here and in the cover
> letter.  I agree with the motivation and most of the things I see in
> this patch, but one thing that stands out at me is if we still want
> to += append to SP_EXTRA_FLAGS in target specific way.  Before this
> patch, because SPARSE_FLAGS was a dual use variable, it needed +=
> appending to it in these two places, but that rationale is gone with
> this patch.
> 
> Also, don't we want to clear SP_EXTRA_FLAGS at the beginning?
> 
> The reason I raise these is because I do not quite see a clear
> answer to "I want to set SP_EXTRA_FLAGS and not SPARSE_FLAGS,
> because ...".

I think the intent here is to *only* use SP_SPARSE_FLAGS as the internal-only variable and to use SPARSE_FLAGS *only* as the additional user-controlable flags. If it is indeed the case, then I think it looks good but maybe it would be better to use another variable's name to make this more explicit or add a small comment.

-- Luc
Previous: Junio C HamanoNext: Ramsay Jones
Message 3 of 8 in “Makefile: improve SPARSE_FLAGS customisation”
  1. 1/1 Makefile: improve SPARSE_FLAGS customisationRamsay Jones, Feb 1, 2019
  2. Junio C HamanoFeb 1, 2019
  3. Luc Van OostenryckFeb 1, 2019
  4. Ramsay JonesFeb 3, 2019
  5. Junio C HamanoFeb 4, 2019
  6. Ramsay JonesFeb 4, 2019
  7. Junio C HamanoFeb 4, 2019
  8. Ramsay JonesFeb 4, 2019

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.