URL: <http://savannah.gnu.org/bugs/?36844>
Summary: Private variables can still leak to dependencies if += is used Project: make Submitted by: phantal Submitted on: Fri 13 Jul 2012 06:15:20 PM GMT Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 3.82 Operating System: Any Fixed Release: None Triage Status: None _______________________________________________________ Details: 01..ASDF := global 02.. 03..${T2}%: private ASDF := 04.. 05.. A: private ASDF += A1 06..${T1}B: private ASDF += B1 07..${T1}C: private ASDF += C1 08.. 09..${T1}C: private ASDF += C2 10..${T1}B: private ASDF += B2 11..${T1}A: private ASDF += A2 12.. 13..A:B 14..B:C 15.. 16..A B C: 17.. @echo "${@}: ${ASDF}" To test this: # Comment out lines 3 & 6-11; this will demonstrate how private variables should behave gmake T1='#' T2='#' C: global B: global A: global A1 A2 # Comment out just line 3; this will demonstrate the problem; targets B & C inherit changes from things that depend on them. C: global A1 A2 B1 B2 C1 C2 B: global A1 A2 B1 B2 A: global A1 A2 # Don't comment out any lines; adding a pattern rule to wipe out ASDF for all targets is a reasonable work-around until this problem gets fixed: gmake C: global C1 C2 B: global B1 B2 A: global A1 A2 _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?36844> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make