bugmake - Bugs: bug #27381, wildcard function acts differently...

 
 

bug #27381: wildcard function acts differently than in 3.81

Submitter:  Mark <mtrinh>
Submitted:  Fri 04 Sep 2009 05:09:17 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.0 Operating System:  None
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 03 Jul 2010 07:58:22 PM UTC, comment #4: 

It doesn't look like the NOSORT flag was required to fix the bug.  It seems to have been only for performance improvement.

Paul D. Smith <psmith>
Group administrator
Tue 08 Sep 2009 04:36:18 PM UTC, comment #3: 

Thanks for the explanation.  I would like to know if the NOSORT is needed to workaround a bug.  Adding $(sort ...) is an acceptable workaround for my wildcards that needs sorting.

Mark <mtrinh>
Tue 08 Sep 2009 05:18:54 AM UTC, comment #2: 

The change to use GLOB_NOCHECK was made to work around a bug.  I can't tell from the ChangeLog (or my memory) whether GLOB_NOSORT was also required as part of that or not.  If not, it was probably done to increase efficiency; many of the uses of wildcard don't require the results to be sorted, and there's nothing in the GNU make manual that specifies that the wildcard function returns its results in sorted order.

I can investigate whether the GLOB_NOSORT is needed or not, but regardless if you require the results to be sorted so that your makefile will work properly, you should be using the $(sort ...) function to ensure it happens rather than relying on undocumented side-effects of $(wildcard ...).

Paul D. Smith <psmith>
Group administrator
Fri 04 Sep 2009 05:14:59 PM UTC, comment #1: 

sorry, it submitted by accident.
wildcard in 3.81 always came back as a sorted list.
in CVS, it was changed to use GLOB_NOSORT.

This causes wildcard to not return a sorted list.  This changes the behavior of wildcard.  Is there a reason not to sort? or why GLOB_NOSORT was added?

Mark <mtrinh>
Fri 04 Sep 2009 05:09:17 PM UTC, original submission:  


Mark <mtrinh>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 mtrinh (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-03 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code