standards/57295: [patch] make does not include cmd linevariables
James E. Flemer
jflemer at uvm.edu
Mon Sep 29 15:30:18 PDT 2003
The following reply was made to PR standards/57295; it has been noted by GNATS.
From: "James E. Flemer" <jflemer at uvm.edu>
To: freebsd-gnats-submit at FreeBSD.org
Subject: Re: standards/57295: [patch] make does not include cmd line variables
Date: Mon, 29 Sep 2003 18:19:31 -0400
Dan Nelson wrote:
> Doesn't POSIX allow our current behaviour?
> The characters are formatted in a manner similar to a portion of the
> make utility command line: options are preceded by hyphens and
> <blank>-separated as described in the Base Definitions volume of IEEE
> Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines. The
> macro=value macro definition operands can also be included. The
> difference between the contents of MAKEFLAGS and the make utility
> command line is that the contents of the variable shall not be subjected
> to the word expansions (see Word Expansions) associated with parsing the
> command line values.
> It says that macro=value can be included, but doesn't have to be.
I believe the paragraph you quote is referring to a user setting
MAKEFLAGS in the environment before running make. In otherwords, if a
user sets MAKEFLAGS="-D FOO BAR=baz", make should accept it.
The paragraph of interest on what make sets MAKEFLAGS to before
makefiles are processed is:
``Before the makefile(s) are read, all of the make utility command line
options (except -f and -p) and make utility command line macro
definitions (except any for the MAKEFLAGS macro), not already included
in the MAKEFLAGS macro, shall be added to the MAKEFLAGS macro, quoted in
an implementation-defined manner such that when MAKEFLAGS is read by
another instance of the make command, the original macro's value is
 IEEE Std 1003.1, 2003 Edition,
More information about the freebsd-standards