bugmake - Bugs: bug #38051, "-n" option gets lost...

 
 

bug #38051: "-n" option gets lost when included Makefile is remade in recursive job

Submitted by:  Frank Heckenbach <frank>
Submitted on:  Thu 10 Jan 2013 03:09:25 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 4.0Operating System: POSIX-Based
Fixed Release: 4.0Triage Status: Verified

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 13 Jan 2013 05:21:59 PM UTC, comment #1:

Thanks; fixed in SCM now.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
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

Frank Heckenbach <frank>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #27234:  test.tar.gz added by frank (224B - application/gzip - Test case)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by frank (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 13 Jan 2013 05:21:59 PM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.0
      Triage StatusNone=>Verified
    Thu 10 Jan 2013 03:09:25 AM UTCfrankAttached File-=>Added test.tar.gz, #27234

    Back to the top


    Powered by Savane 3.1-cleanup1