URL:
<https://savannah.gnu.org/bugs/?61463>
Summary: private does not suppress inheritance on exported
target specific variables
Project: make
Submitted by: None
Submitted on: Wed 10 Nov 2021 07:28:11 PM UTC
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 4.3
Operating System: POSIX-Based
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
When a target specific variable has both the export and private qualifiers,
inheritance is not suppressed.
The following Makefile illustrates the problem:
a: private export FOO := x
a: b
env | sort > $@
b: private export BAR := y
b:
env | sort > $@
Executing the Makefile (env -i used to simplify the output):
$ env -i make
env | sort > b
env | sort > a
Target a has the expected environment:
$ < a
FOO=x
MAKEFLAGS=
MAKELEVEL=1
MAKE_TERMERR=/dev/pts/5
MAKE_TERMOUT=/dev/pts/5
MFLAGS=
Target b's environment contains FOO, which is defined as a private variable on
a, and as such should not be present:
$ < b
BAR=y
FOO=x
MAKEFLAGS=
MAKELEVEL=1
MAKE_TERMERR=/dev/pts/5
MAKE_TERMOUT=/dev/pts/5
MFLAGS=
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61463>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/