[Top][All Lists]

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

Re: Environment variable MAKEFLAGS is wrong on an Intel x86 system.

From: Paul D. Smith
Subject: Re: Environment variable MAKEFLAGS is wrong on an Intel x86 system.
Date: Tue, 31 Oct 2000 13:05:49 -0500

%% address@hidden writes:

  ws> The Environment Variable MAKEFLAGS is wrong on an Intel x86 system.
  ws> (No problems on solaris or dec with the same make version)

I find this difficult to believe.  Are you _SURE_ you're using GNU make,
the same version, on those other platforms?  Use "make --version" to be

There is nothing even remotely platform-specific about this behavior.

For example, GNU make on my Solaris 2.5.1 and Solaris 7 boxes behaves
identically to my Linux box.

  ws> My makefile includes a recursive "$(MAKE) $(MAKEFLAGS) -f
  ws> $(MAKEFILE)" call.  MAKEFLAGS is invalid behind the first call.

This invocation of recursive makes is incorrect and not supported.  It
may have worked "by accident" in the past, and it may still work in
limited situations now, but that's not how MAKEFLAGS is meant to be

MAKEFLAGS is designed to allow a parent to communicate to its child make
invocations via the _environment_, not via the command line.  You should
invoke a submake like:

  $(MAKE) -f $(MAKEFILE)

and _not_ put $(MAKEFLAGS) (or $(MFLAGS) or whatever) on the command
line.  The submake will still get the correct information, including any
command line variable overrides, through the value of MAKEFLAGS it
obtains from the environment set by the parent make.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "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]