help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Chnaging MAKEFLAGS


From: John Graham-Cumming
Subject: Re: Chnaging MAKEFLAGS
Date: Fri, 14 Jan 2005 16:02:32 -0500

On Fri, 2005-01-14 at 15:49, Greg Kilfoyle wrote:
> I tried += too. I've had problems with +=, so I tend to avoid it, but
> that's another story.

I'd love to hear it.

> The text in section 5.6.3 states: "You can also set MAKEFLAGS in a
> makefile, to specify additional flags that should also be in effect
> for
> that makefile.", thus I'm expecting this to work.

Ah.  I see.  Well the way that is actually implemented is that MAKEFLAGS
is reread after the Makefiles have all been read to see if MAKEFLAGS was
changed.  Thus changing MAKEFLAGS in a Makefile changes the execution of
commands by GNU Make, but it does not on the fly change parsing of the
Makefiles.

Here's lines 1481 and 1482 of main.c from GNU Make 3.80:

  /* Decode switches again, in case the variables were set by the
makefile.  */
  decode_env_switches ("MAKEFLAGS", 9);

So you are out of luck with setting -I in a Makefile.

John.
-- 
John Graham-Cumming

Home: http://www.jgc.org/
Work: http://www.electric-cloud.com/
POPFile: http://getpopfile.org/






reply via email to

[Prev in Thread] Current Thread [Next in Thread]