diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2015-02-12 02:35:07 +0100 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2015-02-12 02:35:07 +0100 |
commit | a07026f62bdf0ef96ee9d2078c50d6baae7d4f6e (patch) | |
tree | 1dd2dfc49de31e1bf046e096b634e1303c77e659 /Makefile.am | |
parent | 87635d6e450bfd1ede6efdfcde4ab6f43d2da12d (diff) | |
download | coreutils-a07026f62bdf0ef96ee9d2078c50d6baae7d4f6e.tar.xz |
maint: sort THANKS using our own gear
At least 'sort' on openSUSE/Fedora have a bug in the case-folding code
of their I18N downstream patch which leads to wrong sort results,
e.g. "Dániel" coming after "Dylan".
* Makefile.am (THANKS): Sort the final contributor list using our
own sort implementation - as others may result in a different order;
add a FIXME comment to remove this again once common platforms have
a functional 'sort -f'. Add '-k1,1' for a better sort order.
While at it, save a grep and perl call to prepare the list from
'THANKS.in' by doing all in the first perl call.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index cf0c8a02a..e07bba2f9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -158,16 +158,21 @@ ASSORT = LC_ALL=C sort # Extract all lines up to the first one starting with "##". prologue = perl -ne '/^\#\#/ and exit; print' $(srcdir)/THANKS.in -THANKS: THANKS.in Makefile.am .mailmap thanks-gen .version +# FIXME: avoid dependency to build our own 'sort' for 'make dist' ... +# when common platforms have a functional case-folding implementation: +# $ test 'abácad' = "$(printf '%s\n' 'ab' 'ác' 'ad' \ +# | LC_ALL=en_US.UTF-8 sort -f \ +# | tr -d '\n')" && echo GOOD || echo BAD +THANKS: THANKS.in Makefile.am .mailmap thanks-gen .version $(srcdir)/src/sort $(AM_V_GEN)rm -f $@-t $@; \ { \ $(prologue); echo; \ - { perl -ne '/^$$/.../^$$/ and print' $(srcdir)/THANKS.in \ - | grep -v '^$$' | perl -pe 's/ +/\0/'; \ + { perl -ne '/^$$/.../^$$/ and !/^$$/ and s/ +/\0/ and print' \ + $(srcdir)/THANKS.in; \ git log --pretty=format:'%aN%x00%aE' \ | $(ASSORT) -u; \ } | $(srcdir)/thanks-gen \ - | LC_ALL=en_US.UTF-8 sort -f; \ + | LC_ALL=en_US.UTF-8 $(srcdir)/src/sort -f -k1,1; \ echo; \ printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:; \ } > $@-t && chmod a-w $@-t && mv $@-t $@ |