URL: <http://savannah.gnu.org/bugs/?51190>
Summary: make -n fails if export is used with recursion Project: make Submitted by: rdurkacz Submitted on: Tue 06 Jun 2017 11:36:42 AM UTC Severity: 3 - Normal Item Group: Enhancement Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 3.81 Operating System: Any Fixed Release: None Triage Status: None _______________________________________________________ Details: make -n fails if export is used with recursion by the following argument: If I run "make some_target" and get an unexpected result, I would do this-- make -n some_target > script to see what it was make was trying to do. If I run the commands in "script", one by one or together, I think I should get the same result as in the original case. But it turns out not to work properly if "export" is used in the Makefile. Thus suppose the contents of "script" is-- make target2 and suppose Makefile "exported" var=XXX. Then to give the same result, "script" really should be-- export var=XXX make target2 So that is the argument and I am suggesting that if we must have "export" in make, then the workings of "make -n" should be upgraded to report any exports that are set up. Some people who know make very well would consider this to be a enhancement proposal but not a bug fix but users of make like me might reasonably think it axiomatic that make -n when executed as a script should give the same result as make as a job. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?51190> _______________________________________________ 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