URL: <https://savannah.gnu.org/bugs/?60538>
Summary: Environment variable overrides explicit assignment Project: make Submitted by: sjalloq Submitted on: Thu 06 May 2021 02:24:37 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: I'm not sure what is going on here as I'm not able to create a testcase that highlights the same failure. This issue only happens when calling Make from a Python subprocess running inside a Cocotb test (a simulation framework for RTL simulation). I have a pretty simple Makefile where I set a variable *TESTNAME* using an explicit assignment: TESTNAME=mytest2 and what I'm seeing is that variable being overridden from a matching environment variable. I'm calling Make to run a simulation (make blah TESTNAME=mytest1) and from within that simulation, the Python environment makes a second call to Make using subprocess in order to build a dependency. That dependency (TESTNAME=mytest2) isn't being built because the TESTNAME is overridden to be mytest1. I've built a number of testcases to check this and can't replicate the failure. Also, if I use any other environment variable name aside from TESTNAME, it works as expected. So is there something special about that variable name? It's not reserved or something? What mechanism could there be that would allow an explicit assignment be overridden like this? Thanks. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?60538> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/