[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $(sort) - what is "lexical order"? (was RE: Follow-up)
From: |
Edward Welbourne |
Subject: |
Re: $(sort) - what is "lexical order"? (was RE: Follow-up) |
Date: |
Tue, 19 Jul 2011 21:29:11 +0200 |
> 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 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.
So the short story is: we *could* use strcoll() and have make adapt
itself to the locale preferences of users, but doing that would
probably lead to subtle ways that make files would work for their
authors and be broken for other users, which would be seriously
difficult to debug. We would then need a way for make to let authors
specify, in a make-file, that it should use some particular locale
instead of whatever happens to please the user (so as to avoid such
bugs). Every responsible make-file author would then exercise this
and chose POSIX, i.e. C, so we'd be back where we are today. Ergo,
it's really not worth making such a change.
Eddy.
- Follow-up, Rob Holbert, 2011/07/12
- $(sort) - what is "lexical order"? (was RE: Follow-up), Martin Dorey, 2011/07/12
- Message not available
- RE: $(sort) - what is "lexical order"? (was RE: Follow-up), Martin Dorey, 2011/07/18
- Message not available
- RE: $(sort) - what is "lexical order"? (was RE: Follow-up), Martin Dorey, 2011/07/19
- RE: $(sort) - what is "lexical order"? (was RE: Follow-up), Paul Smith, 2011/07/19
- Re: $(sort) - what is "lexical order"? (was RE: Follow-up), David Boyce, 2011/07/19
- RE: $(sort) - what is "lexical order"? (was RE: Follow-up), Martin Dorey, 2011/07/19
- Re: $(sort) - what is "lexical order"? (was RE: Follow-up),
Edward Welbourne <=
- Message not available
- Re: $(sort) - what is "lexical order"? (was RE: Follow-up), Paul Smith, 2011/07/19