Mark | 4 Sep 19:15 2009
Picon

[bug #27381] wildcard function acts differently than in 3.81


Follow-up Comment #1, bug #27381 (project make):

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?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27381>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/
Paul D. Smith | 8 Sep 07:18 2009
Picon

[bug #27381] wildcard function acts differently than in 3.81


Follow-up Comment #2, bug #27381 (project make):

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

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27381>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/
Mark | 8 Sep 18:36 2009
Picon

[bug #27381] wildcard function acts differently than in 3.81


Follow-up Comment #3, bug #27381 (project make):

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.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27381>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/
Paul D. Smith | 3 Jul 21:58 2010
Picon

[bug #27381] wildcard function acts differently than in 3.81


Update of bug #27381 (project make):

                  Status:                    None => Not A Bug              
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up 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.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27381>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/

Gmane