rocky / remake

Enhanced GNU Make - tracing, error reporting, debugging, profiling and more
http://bashdb.sf.net/remake
GNU General Public License v3.0
785 stars 73 forks source link

remake -X does not save correct value in command line #141

Open vicshen opened 1 year ago

vicshen commented 1 year ago

Makefile in example dir

FLAG = 1
all:
        $(MAKE) -C sub

Makefile in example/sub dir

FLAG = 1
all:
        echo $(FLAG)

Result of remake (correct):

M1: /proj/example % remake FLAG=2
remake -C sub
remake[1]: Entering directory '/proj/example/sub'
echo 2
2
remake[1]: Leaving directory '/proj/example/sub'

Result of remake -X (incorrect, should echo 2 instead of 1):

M1: /proj/example % remake -X FLAG=2
Reading makefiles...
Updating makefiles...
Updating goal targets...
-> (/proj/example/Makefile:2)
all: 
remake<0> c
remake -C sub
remake[1]: Entering directory '/proj/example/sub'
echo 1
1
remake[1]: Leaving directory '/proj/example/sub'

remake version: GNU Make 4.3+dbg-1.5