On 02/11/2015 02:42 PM, Pádraig Brady wrote:
On 11/02/15 08:11, Bernhard Voelker wrote: Right we need to build sort for `make dist`. That would be best avoided TBH, though given we already compile most of lib/ in make dist it's not too bad. We should add a comment to remove when common platforms have a functional sort -f.
Okay, I'll add a comment.
$(AM_V_GEN)rm -f $@-t $@; \ { \ $(prologue); echo; \ @@ -167,7 +167,7 @@ THANKS: THANKS.in Makefile.am .mailmap thanks-gen .version 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 $@I'm wondering about the -k1,1 part. Shouldn't we remove it so it sorts the surnames for same first names? Same for syntax check.
Well, "sort -k1,1" uses the whole line as 2ndary key anyway. But without "-k1,1" the blanks between the surnames and last names is ignored; this leads to "Bo" being sorted in between 2 "Bob"s: $ LC_ALL=en_US.UTF-8 src/sort -f file Bjorn Helgaas [email protected] Bob McCracken [email protected] Bo Borgerson [email protected] Bob Proulx [email protected] $ LC_ALL=en_US.UTF-8 src/sort -f -k1,1 file Bjorn Helgaas [email protected] Bo Borgerson [email protected] Bob McCracken [email protected] Bob Proulx [email protected] I find the latter better to read. Thanks & have a nice day, Berny
