bug-make
[Top][All Lists]
Advanced

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

[bug #48360] Environment variable doesn't loose specialness, although re


From: Stefan Becker
Subject: [bug #48360] Environment variable doesn't loose specialness, although redefined
Date: Fri, 1 Jul 2016 11:38:26 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

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

                 Summary: Environment variable doesn't loose specialness,
although redefined
                 Project: make
            Submitted by: stefanb
            Submitted on: Fri 01 Jul 2016 11:38:24 AM GMT
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.2
        Operating System: None
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

A variable inherited from environment doesn't loose it's specialness, although
flavor/origin don't show specialness anymore.

Test makefile:


# work arounds:
#undefine CC
#override undefine CC

$(info Origin BEFORE: $(origin CC))
$(info Flavor BEFORE: $(flavor CC))

CC = $(error BOOM!)

$(info Origin AFTER:  $(origin CC))
$(info Flavor AFTER:  $(flavor CC))

all:
        @env | grep CC || true


Test run:


$ make
Origin BEFORE: default
Flavor BEFORE: recursive
Origin AFTER:  file
Flavor AFTER:  recursive

# error case
$ CC= make
Origin BEFORE: environment
Flavor BEFORE: recursive
Origin AFTER:  file
Flavor AFTER:  recursive
Makefile:7: *** BOOM!.  Stop.

$ make CC=
Origin BEFORE: command line
Flavor BEFORE: recursive
Origin AFTER:  command line
Flavor AFTER:  recursive
MAKEFLAGS= -- CC=
CC=


In the error case CC retains its environment flavor but the contents are
defined by the makefile. Thus preparing the environment for the command
execution will trigger the $(error).

BTW: you can replace CC with SOME_VAR, i.e. a non-default variable, and the
test case still fails the same way.

This is probably closely related to the following bugs

* bug #35323 <https://savannah.gnu.org/bugs/?35323>
* bug #46585 <https://savannah.gnu.org/bugs/?46585>




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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