help-make
[Top][All Lists]
Advanced

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

Re: Chnaging MAKEFLAGS


From: Greg Kilfoyle
Subject: Re: Chnaging MAKEFLAGS
Date: Fri, 14 Jan 2005 13:48:52 -0800

OK. I have a non-recursive make file setup where all the work is done by
the top level make file including other make files from lower
directories.

We have two makes files at the top level with one being just a shim
around the one that does all the real work, but I can see it is needed
because of the problem I'm running into.

Thanks, Greg.


On Fri, 2005-01-14 at 13:02, John Graham-Cumming wrote:
> 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.
-- 
Greg Kilfoyle <address@hidden>





reply via email to

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