Thu 10 Jan 2013 03:09:25 AM UTC, original submission:
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
|