diff options
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index e618a005..a7250db0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,8 +23,10 @@ EXTRA_DIST = \ ChangeLog-2009 \ README \ README-alpha \ + THANKS.in \ TODO \ - cfg.mk + cfg.mk \ + thanks-gen # Shortcut target to make it easier to run expensive tests. .PHONY: check-expensive @@ -54,3 +56,25 @@ gen-ChangeLog: { rm -f $(distdir)/ChangeLog && \ mv $(distdir)/cl-t $(distdir)/ChangeLog; } \ fi + +# Sort in traditional ASCII order, regardless of the current locale; +# otherwise we may get into trouble with distinct strings that the +# current locale considers to be equal. +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 + $(AM_V_GEN)rm -f $@-t $@; \ + { \ + $(prologue); echo; \ + { perl -ne '/^$$/.../^$$/ and print' $(srcdir)/THANKS.in \ + | grep -v '^$$' | perl -pe 's/ +/\0/'; \ + git log --pretty=format:'%aN%x00%aE' \ + | $(ASSORT) -u; \ + } | $(srcdir)/thanks-gen \ + | LC_ALL=en_US.UTF-8 sort -f; \ + echo; \ + printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:; \ + } > $@-t && chmod a-w $@-t && mv $@-t $@ |