URL: <http://savannah.gnu.org/bugs/?38051>
Summary: "-n" option gets lost when included Makefile is remade in recursive job Project: make Submitted by: frank Submitted on: Do 10 Jan 2013 03:09:25 GMT Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: CVS Operating System: POSIX-Based Fixed Release: None Triage Status: None _______________________________________________________ Details: With the attached Makefiles, when running "rm -f inc; make -n", I get this output. The "sleep" actually runs (despite "-n"), and the "echo" shows that "n" is missing from MAKEFLAGS. make -fm2 bar make[1]: Entering directory 'foo' touch inc make[1]: Leaving directory 'foo' make[1]: Entering directory 'foo' echo w w sleep 1 make[1]: Leaving directory 'foo' This was tested with the CVS version. It works correctly with 3.81. The following change seems to fix the problem ("echo wn" and "sleep" is only printed, not run). I'm not sure if it was just a typo, or if there are cases where "1" is actually needed, though it appears this statement was added to undo the effects of the preceding "define_makeflags" (line ~2023) for the reexec, whereas in the normal (non-reexec) case, the "define_makeflags (1, 0);" (line ~2278) does it. If so, it seems logical that "0" is the correct parameter here. --- main.c.orig 2013-01-06 19:25:06.000000000 +0100 +++ main.c 2013-01-10 03:49:36.000000000 +0100 @@ -2172,7 +2172,7 @@ /* Reset makeflags in case they were changed. */ { - const char *pv = define_makeflags (1, 1); + const char *pv = define_makeflags (1, 0); char *p = alloca (CSTRLEN ("MAKEFLAGS=") + strlen (pv) + 1); sprintf (p, "MAKEFLAGS=%s", pv); putenv (allocated_variable_expand (p)); PS: I hope this report goes to the right place. I could not find a link to report bugs on the Savannah page. I found this via Google and s/coreutils/make/: http://osdir.com/ml/bug-coreutils-gnu/2009-06/msg00205.html _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Do 10 Jan 2013 03:09:25 GMT Name: test.tar.gz Size: 224B By: frank Test case <http://savannah.gnu.org/bugs/download.php?file_id=27234> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?38051> _______________________________________________ Nachricht gesendet von/durch Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make