bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #52076] wildcard/glob should be sorted


From: Paul D. Smith
Subject: [bug #52076] wildcard/glob should be sorted
Date: Sun, 24 Sep 2017 10:53:28 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #10, bug #52076 (project make):

The test attached here is not a good one: since you create files in the
directory such that they're mostly ordered already, the sort operation doesn't
need to do much work.

However, I created my own test using uuidgen to create files named with UUIDs,
so that the order of creation in the directory and the sort order would not be
correlated at all, and I still didn't see much difference (the ordered version
was consistently slower but not in a very significant way).

I don't remember the impetus for this change specifically: there was a request
for it.  Maybe from one of the alternate ports like Windows or VMS (however
both use the glob/* code that comes with make so I'd be surprised if it were
terribly impacting).  It should be in the mailing list but I can't find it.  I
suppose it's possible it came to me directly but it seems unlikely; I
virtually always at least reply to the list.

I don't particularly mind switching it back again, barring testing on
alternative platforms, but David Boyce is correct: it's been unsorted for so
long that any portable makefile cannot rely on this sorting behavior for many
years to come even if we switch it now.  If your goal is to support
reproducible builds you'll either need to mandate a particular version of GNU
make, or else use $(sort ...) in your makefile explicitly to guarantee order. 
The latter seems safer to me in any event, if the goal is reproducible builds.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]