bug-make
[Top][All Lists]
Advanced

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

Passing Command Line Variables in a Recursive Make


From: Stanley, Keith E
Subject: Passing Command Line Variables in a Recursive Make
Date: Mon, 14 Jan 2002 10:26:38 -0600

Hi..

Let me preference by saying right or wrong, my experience with make comes
from Irix on SGI and the book "Managing Projects with Make", Feb 93
printing, by Andrew Oram and Steve Talbott from O'Reilly & Associates, Inc.

When doing a recursive make with the GNU 3.79.1 make, I ran into a surprise
with the way command line variables are handled.  It seems with GNU that
once a variable is set on a command line it is passed automatically to the
sub makes.  With SGI, command line variables must be set each time for them
to be passed to the sub makes.  Oram and Talbott's book on page 73 documents
make as working like the SGI implementation.  After rooting around "info
make" on my Linux box, I did find a discussion about setting MAKEOVERRIDES
in the make command line.  If I set "MAKEOVERRIDES=" in the first recursive
make call in my attached example, then the GNU make does work as I would
expect.

Please at least document MAKEOVERRIDES at
http://www.gnu.org/manual/make-3.79.1/html_node/make_toc.html and/or better
yet add a command line option to have make not automatically pass variables
to sub makes.

Attached is a simple makefile with output from Red Hat 7.2 and SGI Irix
6.5.4

 <<GNUmakeOutput.txt>>  <<Makefile>>  <<SGImakeOutput.txt>> 

Keith Stanley
Flight Simulation
System of Systems Assessment
Voice: (314) 233-8209
Fax:    (314) 233-5125
The Boeing Company
P.O. Box 516. MC: S0642233
St. Louis, Missouri 63166


Attachment: GNUmakeOutput.txt
Description: Text document

Attachment: Makefile
Description: Binary data

Attachment: SGImakeOutput.txt
Description: Text document


reply via email to

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