On Fri, Feb 22 2019, Jeff King wrote:

> On Fri, Feb 22, 2019 at 03:41:21PM +0100, Ævar Arnfjörð Bjarmason wrote:
>
>> This fixes a long-standing annoyance of mine of not being able to set
>> my own CFLAGS combined with DEVELOPER="...".
>
> I already do this, via my config.mak. Are you passing these on the
> command-line (and thus your CFLAGS= prevents DEVELOPER= from adding
> anything to it)? That does seem worth fixing.

Yes. I'll make this clearer in v2. I never use config.mak, so I didn't
even know that worked. Having refreshed on the docs[1], it's because
command-line arguments are "override variables".

> My personal complaint is that you cannot override DEVELOPER flags via
> config.mak, because of the ordering. But it looks like your patch 6
> specifically addresses that (yay!).

Do you mean DEVOPTS? That works for me.

    $ cat config.mak
    CFLAGS = -blah
    DEVELOPER = 1
    DEVOPTS = pedantic
    $ make V=1
    [...] cc [...]  -blah -Werror -pedantic [...]

But then of course:

    $ rm config.mak
    $ CFLAGS=-cmd DEVELOPER=1 DEVOPTS=pedantic V=1

Only includes the flags, and ignores DEVELOPER & DEVOPTS.

1. https://www.gnu.org/software/make/manual/html_node/Overriding.html

Reply via email to