bugmake - Bugs: bug #31155, .SECONDEXPANSION: incorrect order...

 
 

bug #31155: .SECONDEXPANSION: incorrect order only parsing in patterns

Submitted by:  None
Submitted on:  Tue 28 Sep 2010 07:46:27 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.82Operating System: Any
Fixed Release: 4.0Triage Status: Verified

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Sun 22 Sep 2013 09:11:41 PM UTC, comment #3:

This will be fixed in the next release of GNU make. Thanks for the report.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Thu 30 Sep 2010 11:27:30 PM UTC, comment #2:

Sorry, I thought I had to attach this comment; here it is directly:

From running GNU Make 3.82 in a debugger:

For target "foo", pattern_search() treats "$(PREREQS)" as one
word not equal to "|", and therefore does not set the order-only
flag. Instead, it applies second expansion to produce "p1|p2".
It then invokes PARSE_FILE_SEQ, which stops at '|', but the fact
that "|p2" remains unparsed goes unnoticed.

For target "bar", pattern_search() treats "p1|$(P2)" as two
words: "p1|" and "$(P2)", neither equal to "|". Note the
significance of the absence of space before '|'. The first
word gets second-expanded trivially and then split into "p1",
ignoring the leftover "|". The second gets second-expanded
into p2, which is treated as a normal prerequisite because
the '|' was ignored.

The comparison of words against "|" before second expansion
seems both unnecessary and insufficient. Would it be better
to check the results of PARSE_FILE_SEQ, to see if it stopped
because it found a '|'?

-- John Carey

Anonymous
Tue 28 Sep 2010 09:30:31 PM UTC, comment #1:

Hm. This is a side-effect of the performance increase in 3.82, where we do more of the parsing of the prerequisite list up-front, even for secondary expansion.

This will need to be looked at. There may be other issues related to globbing etc.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Tue 28 Sep 2010 07:46:27 PM UTC, original submission:

With this Makefile:
The GNU Make 3.81 output seems correct:
But the GNU Make 3.82 output seems incorrect:

-- John Carey

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #21586:  20100930.txt added by None (931B - text/plain - Please see attached file 20100930.txt for debugging results. -- John Carey)

 

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)
  •  

    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 22 Sep 2013 09:11:41 PM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.0
    Thu 30 Sep 2010 11:23:42 PM UTCNoneAttached File-=>Added 20100930.txt, #21586
    Tue 28 Sep 2010 09:30:31 PM UTCpsmithTriage StatusNone=>Verified

    Back to the top


    Powered by Savane 3.1-cleanup