bugmake - Bugs: bug #61463, private does not suppress...

 
 

bug #61463: private does not suppress inheritance on exported target specific variables

Submitter:  None
Submitted:  Wed 10 Nov 2021 07:28:11 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.3 Operating System:  POSIX-Based
Fixed Release:  4.4.1 Triage Status:  Small Effort
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 03 Jan 2023 07:26:48 AM UTC, comment #1: 

Thanks for the report.  A fix was pushed and will be in the next release.

Paul D. Smith <psmith>
Group administrator
Wed 10 Nov 2021 07:28:11 PM UTC, original submission:  

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=

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-08 psmith Fixed Release4.4 4.4.1
    2023-01-03 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.4
        Triage StatusNone Small Effort

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code