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

 
 

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

Submitter:  Frank Heckenbach <frank>
Submitted:  Thu 10 Jan 2013 03:09:25 AM UTC
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.0 Operating System:  POSIX-Based
Fixed Release:  4.0 Triage Status:  Verified
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

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

Thanks; fixed in SCM now.

Paul D. Smith <psmith>
Project Administrator
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 Files:
   
   
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
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by frank (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-01-13 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.0
        Triage StatusNone Verified
    2013-01-10 frank Attached File- Added test.tar.gz, #27234

    Back to the top


    Powered by Savane 3.9