URL:
<https://savannah.gnu.org/bugs/?61218>
Summary: The -e option confuses the $(origin )
Project: make
Submitted by: masahiroy
Submitted on: Sat 25 Sep 2021 07:12:00 AM UTC
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: None
Operating System: None
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
Two makefiles are attached.
Without -e, $(origin FOO) remembers
that FOO came from the command line.
masahiro@grover:~$ make FOO=1
the origin of FOO: command line
FOO: 1
MAKEOVERRIDES: FOO=1
make -f Makefile.sub
make[1]: Entering directory '/home/masahiro'
the origin of FOO: command line
FOO: 1
MAKEOVERRIDES: FOO=1
make[1]: Leaving directory '/home/masahiro'
With -e, $(origin FOO) in the sub-make
shows 'environment' while it was given
from the command line.
Interestingly, FOO=1 was removed from $(MAKEOVERRIDES)
masahiro@grover:~$ make -e FOO=1
the origin of FOO: command line
FOO: 1
MAKEOVERRIDES: FOO=1
make -f Makefile.sub
make[1]: Entering directory '/home/masahiro'
the origin of FOO: environment
FOO: 1
MAKEOVERRIDES:
make[1]: Leaving directory '/home/masahiro'
Related discussion:
https://lists.gnu.org/archive/html/help-make/2021-09/msg00005.html
R
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sat 25 Sep 2021 07:12:00 AM UTC Name: Makefile Size: 132B By:
masahiroy
<http://savannah.gnu.org/bugs/download.php?file_id=51961>
-------------------------------------------------------
Date: Sat 25 Sep 2021 07:12:00 AM UTC Name: Makefile.sub Size: 112B By:
masahiroy
<http://savannah.gnu.org/bugs/download.php?file_id=51962>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61218>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/