* Makefile.am (sort-THANKS.in): Add target to sort the name/email pair
list in 'THANKS.in'.
* THANKS.in: Sort via the above new target.
* cfg.mk (sc_THANKS_in_sorted): Add rule to ensure that 'THANKS.in'
remains sorted.
---
 Makefile.am | 15 +++++++++++++++
 THANKS.in   | 56 ++++++++++++++++++++++++++++----------------------------
 cfg.mk      | 11 +++++++++++
 3 files changed, 54 insertions(+), 28 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index cf0c8a0..e3a4354 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -172,6 +172,21 @@ THANKS: THANKS.in Makefile.am .mailmap thanks-gen .version
          printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:;     \
        } > $@-t && chmod a-w $@-t && mv $@-t $@
 
+# Sort the contributor name/email pair list in 'THANKS.in'.
+# See sc_THANKS_in_sorted ... which uses the same sort options.
+.PHONY: sort-THANKS.in
+sort-THANKS.in: Makefile.am
+       $(AM_V_GEN)rm -f $@-t;                                          \
+       {                                                               \
+         sed '/^$$/q' THANKS.in                                        \
+           && { sed '/^$$/,/^$$/!d;/^$$/d' THANKS.in                   \
+                  | LC_ALL='en_US.UTF-8' sort -f -k1,1; }              \
+           && echo                                                     \
+           && sed '0,/^$$/d;0,/^$$/d' THANKS.in;                       \
+       } > $@-t                                                        \
+         && test "$$(wc < THANKS.in)" = "$$(wc < $@-t)"                \
+         && mv $@-t THANKS.in
+
 # Some of our git hook scripts are supposed to be identical to git's samples.
 # See if they are still in sync.
 .PHONY: check-git-hook-script-sync
diff --git a/THANKS.in b/THANKS.in
index 1621012..e738d63 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -33,12 +33,11 @@ aldomel                             [email protected]
 Alen Muzinic                        [email protected]
 Alexander Nguyen                    [email protected]
 Alexander V. Lukyanov               [email protected]
-Allen Hewes                         [email protected]
-Axel Dörfler                        [email protected]
 Alexandre Duret-Lutz                [email protected]
 Alexey Solovyov                     [email protected]
 Alexey Vyskubov                     [email protected]
 Alfred M. Szmidt                    [email protected]
+Allen Hewes                         [email protected]
 Ambrose Feinstein                   [email protected]
 Amr Ali                             [email protected]
 Anders Kaseorg                      [email protected]
@@ -72,6 +71,7 @@ Arun Sharma                         [email protected]
 Arvind Autar                        [email protected]
 Augey Mikus                         [email protected]
 Austin Donnelly                     [email protected]
+Axel Dörfler                        [email protected]
 Axel Kittenberger                   [email protected]
 Barry Kelly                         http://barrkel.blogspot.com/
 Bauke Jan Douma                     [email protected]
@@ -110,6 +110,7 @@ Charles Karney                      [email protected]
 Charles Randall                     [email protected]
 Chas. Owens                         [email protected]
 Chip Salzenberg                     [email protected]
+Choi Jongu                          [email protected]
 Chris Clayton                       [email protected]
 Chris Faylor                        [email protected]
 Chris J. Bednar                     [email protected]
@@ -142,7 +143,6 @@ Daniel Mach                         [email protected]
 Daniel P. Berrangé                  [email protected]
 Daniel Stavrovski                   [email protected]
 Daniel Tschinder                    [email protected]
-Dániel Varga                        [email protected]
 Danny Levinson                      [email protected]
 Darrel Francis                      [email protected]
 Darren Salt                         [email protected]
@@ -164,8 +164,8 @@ Dean Gaudet                         [email protected]
 Deepak Goel                         [email protected]
 Denis Excoffier                     [email protected]
 Denis McKeon                        [email protected]
-Dennis Henriksen                    [email protected]
 Dennis Clarke                       [email protected]
+Dennis Henriksen                    [email protected]
 Dennis Smit                         [email protected]
 Derek Clegg                         [email protected]
 Dick Streefland                     [email protected]
@@ -178,6 +178,7 @@ Doug Coleman                        
[email protected]
 Doug McLaren                        [email protected]
 Dragos Harabor                      [email protected]
 Duncan Roe                          [email protected]
+Dániel Varga                        [email protected]
 Edward Schwartz                     [email protected]
 Edzer Pebesma                       [email protected]
 Egmont Koblinger                    [email protected]
@@ -203,19 +204,19 @@ Florent Bayle                       [email protected]
 Florian Schlichting                 [email protected]
 Florin Iucha                        [email protected]
 Francesco Montorsi                  [email protected]
-François Pinard                     [email protected]
 Frank Adler                         [email protected]
 Frank T Lofaro                      [email protected]
+François Pinard                     [email protected]
 Fred Fish                           [email protected]
-Frédéric L. W. Meunier              [email protected]
 Frederik Eaton                      [email protected]
+Frédéric L. W. Meunier              [email protected]
 Gabor Z. Papp                       [email protected]
-Gaël Quéri                          [email protected]
 Galen Hazelwood                     [email protected]
 Gary Anderson                       [email protected]
 Gary Johnson                        [email protected]
 Gary V. Vaughan                     [email protected]
 Gaute Hvoslef Kvalnes               [email protected]
+Gaël Quéri                          [email protected]
 Geoff Collyer                       geoff at collyer.net
 Geoff Kuenning                      [email protected]
 Geoff Odhner                        [email protected]
@@ -224,8 +225,6 @@ Gerald Pfeifer                      [email protected]
 Gerhard Poul                        [email protected]
 Germano Leichsenring                [email protected]
 Glen Lenker                         [email protected]
-Göran Uddeborg                      [email protected]
-Guochun Shi                         [email protected]
 GOTO Masanori                       [email protected]
 Greg Louis                          [email protected]
 Greg McGary                         [email protected]
@@ -236,6 +235,8 @@ Greg Wooledge                       [email protected]
 Gregory Leblanc                     [email protected]
 Guido Leenders                      [email protected]
 Guntram Blohm                       [email protected]
+Guochun Shi                         [email protected]
+Göran Uddeborg                      [email protected]
 H. J. Lu                            [email protected]
 Hans Ginzel                         [email protected]
 Hans Lermen                         [email protected]
@@ -250,8 +251,8 @@ Herbert Xu                          
[email protected]
 Holger Berger                       [email protected]
 Hon-Yin Kok                         [email protected]
 Hugh Daniel                         [email protected]
-Ian Bruce                           [email protected]
 Iain Calder                         [email protected]
+Ian Bruce                           [email protected]
 Ian Jackson                         [email protected]
 Ian Kent                            [email protected]
 Ian Lance Taylor                    [email protected]
@@ -264,8 +265,8 @@ Ivo Timmermans                      [email protected]
 Jacky Fong                          [email protected]
 James                               [email protected]
 James Antill                        jmanti%[email protected]
-James Lemley                        [email protected]
 James Hunt                          [email protected]
+James Lemley                        [email protected]
 James Ralston                       [email protected]
 James Sneeringer                    [email protected]
 James Tanis                         [email protected]
@@ -288,9 +289,7 @@ Jens Elkner                         [email protected]
 Jens Schmidt                        [email protected]
 Jeph Cowan                          [email protected]
 Jeremy Maitin-Shepard               [email protected]
-Jérémy Magrin                       [email protected]
 Jerome Abela                        [email protected]
-Jérôme Zago                         [email protected]
 Jesse Kornblum                      [email protected]
 Jesse Thilo                         [email protected]
 Jie Xu                              [email protected]
@@ -326,11 +325,13 @@ Juan F. Codagnone                   [email protected]
 Juan M. Guerrero                    [email protected]
 Julian Bradfield                    [email protected]
 Jungshik Shin                       [email protected]
-Jürgen Fluk                         [email protected]
 Juraj Marko                         [email protected]
 Jurriaan                            [email protected]
 Justin Pryzby                       [email protected]
 jvogel                              [email protected]
+Jérémy Magrin                       [email protected]
+Jérôme Zago                         [email protected]
+Jürgen Fluk                         [email protected]
 Kai Henningsen                      [email protected]
 Kai-Uwe Rommel                      [email protected]
 Kalle Olavi Niemitalo               [email protected]
@@ -346,9 +347,9 @@ Ken Irving                          [email protected]
 Ken Pizzini                         [email protected]
 Kevin Mudrick                       [email protected]
 Kirk Kelsey                         [email protected]
+Kjetil Torgrim Homme                [email protected]
 Konrad Wróblewski                   [email protected]
 Kristin E Thomas                    [email protected]
-Kjetil Torgrim Homme                [email protected]
 Kristoffer Rose                     [email protected]
 Ladislav Hagara                     [email protected]
 Larry McVoy                         [email protected]
@@ -365,11 +366,10 @@ M. P. Suzuki                        
[email protected]
 Maciej Kwapulinski                  [email protected]
 Manas Garg                          [email protected]
 Manfred Hollstein                   [email protected]
-Марк Коренберг                      [email protected]
 Marc Boucher                        [email protected]
 Marc Haber                          [email protected]
-Marc Mengel                         [email protected]
 Marc Lehman                         [email protected]
+Marc Mengel                         [email protected]
 Marc Olzheim                        [email protected]
 Marcel Böhme                        http://www.comp.nus.edu.sg/~mboehme
 Marco Franzen                       [email protected]
@@ -400,6 +400,7 @@ Marty Leisner                       
[email protected]
 Masami Takikawa                     [email protected]
 Mate Wierdl                         [email protected]
 Matej Vela                          [email protected]
+Mathias Brodala                     [email protected]
 Matias A. Fonzo                     [email protected]
 Matt Kraai                          [email protected]
 Matt McCutchen                      [email protected]
@@ -408,15 +409,14 @@ Matt Pham                           [email protected]
 Matt Schalit                        [email protected]
 Matt Swift                          [email protected]
 Matthew Arnison                     [email protected]
-Matthew M. Boedicker                [email protected]
 Matthew Braun                       [email protected]
 Matthew Clarke                      [email protected]
+Matthew M. Boedicker                [email protected]
 Matthew S. Levine                   [email protected]
 Matthew Smith                       [email protected]
 Matthew Swift                       [email protected]
 Matthias Urlichs                    [email protected]
 Matti Aarnio                        [email protected]
-Mathias Brodala                     [email protected]
 Mattias Wadenstein                  [email protected]
 Max Chang                           [email protected]
 Meelis Roos                         [email protected]
@@ -438,8 +438,8 @@ Michael Price                       [email protected]
 Michael Steffens                    [email protected]
 Michael Stummvoll                   [email protected]
 Michael Stutz                       [email protected]
-Michael van Elst                    [email protected]
 Michael Veksler                     [email protected]
+Michael van Elst                    [email protected]
 Michail Litvak                      [email protected]
 Michal Politowski                   [email protected]
 Michal Svec                         [email protected]
@@ -476,7 +476,6 @@ Olav Morkrid                        [email protected]
 Ole Laursen                         [email protected]
 Oliver Kiddle                       [email protected]
 Olivier Fourdan                     [email protected]
-Ørn E. Hansen                       [email protected]
 Oskar Liljeblad                     [email protected]
 Otavio Salvador                     [email protected]
 Patrick Mauritz                     [email protected]
@@ -507,11 +506,11 @@ Petr Uzel                           [email protected]
 Petter Reinholdtsen                 [email protected]
 Phelippe Neveu                      [email protected]
 Phil Richards                       [email protected]
+Philipp Gortan                      [email protected]
+Philipp Thomas                      [email protected]
 Philippe De Muyter                  [email protected]
 Philippe Schnoebelen                [email protected]
 Phillip Jones                       [email protected]
-Philipp Gortan                      [email protected]
-Philipp Thomas                      [email protected]
 Piergiorgio Sartor                  [email protected]
 Pieter Bowman                       [email protected]
 Piotr Gackiewicz                    [email protected]
@@ -560,7 +559,6 @@ Santiago Vila Doncel                [email protected]
 Savochkin Andrey Vladimirovich      [email protected]
 Scott Harrison                      [email protected]
 Scott Lurndal                       [email protected]
-Sébastien Maret                     [email protected]
 Sergei Steshenko                    [email protected]
 Sergey Vlasov                       [email protected]
 Shing-Shong Shei                    [email protected]
@@ -569,7 +567,6 @@ Solar Designer                      [email protected]
 Stanislav Ievlev                    [email protected]
 Stavros Passas                      [email protected]
 Stefan Vargyas                      [email protected]
-Stéphane Chazelas                   [email protected]
 Stephen Depooter                    [email protected]
 Stephen Eglen                       [email protected]
 Stephen Gildea                      [email protected]
@@ -581,18 +578,20 @@ Steve Ward                          [email protected]
 Steven Drake                        [email protected]
 Steven G. Johnson                   [email protected]
 Steven Mocking                      [email protected]
+Steven P Watson                     [email protected]
 Steven Parkes                       [email protected]
 Steven Schveighoffer                [email protected]
-Steven P Watson                     [email protected]
 Stuart Citrin                       [email protected]
 Stuart Kemp                         [email protected]
 Stuart Shelton                      [email protected]
+Stéphane Chazelas                   [email protected]
 Sven Breuner                        [email protected]
 Szakacsits Szabolcs                 [email protected]
+Sébastien Maret                     [email protected]
 Tadayoshi Funaba                    [email protected]
 TAKAI Kousuke                       [email protected]
-Theodore Ts'o                       [email protected]
 The Wanderer                        [email protected]
+Theodore Ts'o                       [email protected]
 Thomas Bushnell                     [email protected]
 Thomas Goerlich                     [email protected]
 Thomas Hood                         [email protected]
@@ -660,8 +659,9 @@ Yang Ren                            [email protected]
 Yanko Kaneti                        [email protected]
 Yann Dirson                         [email protected]
 Youngjun Song                       [email protected]
-Choi Jongu                          [email protected]
 Yutaka Amanai                       [email protected]
+Ørn E. Hansen                       [email protected]
+Марк Коренберг                      [email protected]
 
 ;; Local Variables:
 ;; coding: utf-8
diff --git a/cfg.mk b/cfg.mk
index f5be6de..26df247 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -611,6 +611,17 @@ sc_THANKS_in_duplicates:
            && { echo '$(ME): remove the above names from THANKS.in'    \
                  1>&2; exit 1; } || :
 
+# Ensure the contributor list stays sorted.  The sort order can be fixed
+# with 'make sort-THANKS.in' ... which uses the same sort options.
+sc_THANKS_in_sorted:
+       @sed '/^$$/,/^$$/!d;/^$$/d' THANKS.in > [email protected];                   \
+       LC_ALL='en_US.UTF-8' sort -f -k1,1 [email protected] > [email protected]
+       @diff -u [email protected] [email protected]; diff=$$?;                                   \
+       rm -f [email protected] [email protected];                                                \
+       test "$$diff" = 0                                               \
+         || { echo '$(ME): THANKS.in is unsorted; please run'          \
+                'make sort-THANKS.in' 1>&2; exit 1; }
+
 # Look for developer diagnostics that are marked for translation.
 # This won't find any for which devmsg's format string is on a separate line.
 sc_marked_devdiagnostics:
-- 
2.1.4


Reply via email to