help-make
[Top][All Lists]
Advanced

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

Re: gmake -C mess up MAKEFLAGS?


From: Paul Smith
Subject: Re: gmake -C mess up MAKEFLAGS?
Date: Sat, 31 Oct 2009 17:34:29 -0400

On Sat, 2009-10-31 at 11:23 -0700, RobinK wrote:
> foo:
>       $(MAKE) $(MAKEFLAGS)
> 
> 
> Yeah, that's exactly what I did. So what's the correct syntax? What I need
> is, if I pass any parameters to the top level makefile, those params should
> be passed to subdirectory level makefile.

Make already does that.  That's what MAKEFLAGS are for... and make
handles it for you.

Just run:

        foo:
                $(MAKE)

and you're done.  Just be SURE to use the variable $(MAKE), not the
static string "make".

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist





reply via email to

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