bug-make
[Top][All Lists]
Advanced

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

[bug #49183] Macros set in MAKEFLAGS should not be added to the environm


From: Paul D. Smith
Subject: [bug #49183] Macros set in MAKEFLAGS should not be added to the environment
Date: Sun, 25 Sep 2016 20:07:04 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0

URL:
  <http://savannah.gnu.org/bugs/?49183>

                 Summary: Macros set in MAKEFLAGS should not be added to the
environment
                 Project: make
            Submitted by: psmith
            Submitted on: Sun 25 Sep 2016 04:07:02 PM EDT
                Severity: 3 - Normal
              Item Group: Enhancement
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.2.1
        Operating System: Any
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

The upcoming POSIX spec specifies that macro assignments added to the
MAKEFLAGS variable should not be added into make's environment (or exported
into the environment of commands that make invokes).

Text from the draft of the standard:


    Before the makefile(s) are read, all of the make utility command line
macro definitions (except the
    MAKEFLAGS macro or the SHELL macro) shall be added to the
environment of make. Other
+   implementation-defined variables may also be added to the
environment of make. Macros
+  defined by the MAKEFLAGS environment variable and macros defined in the
makefile(s) shall
+   not be added to the environment of make if they are not already in its
environment. With the
+   exception of SHELL (see below), it is unspecified whether macros defined
in these ways update
    the value of an environment variable that already exists in the
environment of make.


(changes to the standard are marked with "+").  Currently, make will add those
macros to the environment:


$ echo 'all:;@echo FOO=$$FOO' | MAKEFLAGS=FOO=bar make -f-
FOO=bar


See also this thread in bug-make:
http://lists.gnu.org/archive/html/bug-make/2016-09/msg00030.html




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49183>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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