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 10:52:40 -0400

On Sat, 2009-10-31 at 07:32 -0700, RobinK wrote:
> But this is inconvenient. I do want it to print the directory, but I
> don't want that "w" to be in $(MAKEFLAGS). Plus, even if it has to add
> the w, shouldn't it be "-w" rather than just a "w"? The extra w
> totally messed up my makefile in the sub directory.

This is exactly how it's supposed to work.  Read about MAKEFLAGS in the
GNU make manual to know why there's no leading "-".

If it messed up your makefile, then your makefile is not correct.
Remember that MAKEFLAGS is an INTERNAL variable, intended for use by
make to pass information to sub-makes through the environment.  It is
not intended to ever be used in a command line; for example you would
never write:

        foo:
                $(MAKE) $(MAKEFLAGS)

or something like that.

In what way did it mess up your makefile in the sub-directory?

-- 
-------------------------------------------------------------------------------
 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]