Putting OP's reply on the record.
From: Rob Holbert [mailto:robholb...@gmail.com]
Sent: Tuesday, July 19, 2011 04:49
To: Martin Dorey
Subject: Re: $(sort) - what is lexical order? (was RE: Follow-up)
Wow,
Just putting your sources in order yourself will be much
There is no standard definition of lexical order that I'm aware of
that means only, and exactly, sorted according to the current locale
collation definition. The free dictionary defines it as:
the arrangement of a set of items in accordance with a recursive
algorithm, such as the
On Tue, Jul 19, 2011 at 3:00 PM, Paul Smith psm...@gnu.org wrote:
I agree that the manual should document the fact that the sort function
does not sort according the current LC_COLLATE value but instead always
uses the standard ASCII (or LC_COLLATE=C) order.
But I will not say that it
GNU make uses the standard C runtime function qsort(3) to perform its
sorting, with a comparison function of the standard C runtime function
strcmp().
...
The builtin sort function DOES sort. It may not sort the way you would
prefer, but it sorts in a standard, repeatable, well-defined way
) - what is lexical order? (was RE: Follow-up)
On Tue, Jul 19, 2011 at 3:00 PM, Paul Smith psm...@gnu.org wrote:
I agree that the manual should document the fact that the sort function
does not sort according the current LC_COLLATE value but instead always
uses the standard ASCII (or LC_COLLATE=C
Please don't reply only to me: discussions belong on the mailing lists.
On Tue, 2011-07-19 at 15:32 -0400, Rob Holbert wrote:
The key in that definition is depends on their first letter, not
the capitalization of their first letter. But in any event, if you
don't have a clear definition for
:=$(call strcoll,B a)'; } | make -f - -p 21 | grep '^L '
L := a B
martind@whitewater:~$
From: Rob Holbert [mailto:robholb...@gmail.com]
Sent: Sunday, July 17, 2011 10:13
To: Martin Dorey
Subject: Re: $(sort) - what is lexical order? (was RE: Follow-up)
I contend
OP has something of a point: contrast the locale-dependent behavior of sort(1)
with make's $(sort):
$ echo 'L:=$(sort B a)' | make -f - -p 21 | grep '^L '
L := B a
$ { echo B; echo a; } | sort
a
B
$ { echo B; echo a; } | LC_ALL=C sort
B
a
$
I present this more to provoke we can't change that!