summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am25
1 files changed, 24 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index e6ee9b2..1553958 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,7 +22,8 @@ noinst_HEADERS = basicdefs.h
EXTRA_DIST = BUGS THANKS COPYING.DOC \
ChangeLog-2014 po/ChangeLog-2014 \
- bootstrap bootstrap.conf build-aux/texi2dvi build-aux/help2man
+ bootstrap bootstrap.conf build-aux/texi2dvi build-aux/help2man \
+ thanks-gen
# Arrange so that .tarball-version appears only in the distribution
# tarball, and never in a checked-out repository.
@@ -46,6 +47,28 @@ gen-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 $@
+
html:
cd doc && make html