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 entries in a dictionary whose order depends on their first letter unless these are the same in which case it is the second which decides, and so on Which seems reasonable to me. 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 strcmp() function is defined by both the ISO C and POSIX standards to perform byte-wise comparisons; that is, it uses ASCII sorting order (on systems where the characters are stored as ASCII chars, which is just about all of them these days). 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 that does not change based on a particular user's environment settings... most creators of build systems consider this reproducibility to be MUCH more important than locale-specific collation, which is just visual flourish. 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 doesn't sort lexically, because that's not true: it does. _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make