maint: new syntax-check rule to ensure that AUTHORS stays in sync

* cfg.mk (sc_check_AUTHOR_list): New rule.
* .mailmap: New file, to tell git log how to map email addresses.
This commit is contained in:
Jim Meyering 2010-05-28 11:27:12 +02:00
parent 55945841bc
commit 208b2ad879
2 changed files with 26 additions and 0 deletions

12
.mailmap Normal file
View File

@ -0,0 +1,12 @@
<amy.griffis@hp.com> <aron.griffis@hp.com>
<bozzolan@gmail.com> <redshift@gmx.com>
<charles_duffy@messageone.com> <charles@dyfis.net>
<dfj@redhat.com> <dfj@dfj.bne.redhat.com>
<eblake@redhat.com> <ebb9@byu.net>
<gdolley@arpnetworks.com> <gdolley@ucla.edu>
<gerhard.stenzel@de.ibm.com> <gstenzel@linux.vnet.ibm.com>
<jamie@canonical.com> <jamie@ubuntu.com>
<laine@redhat.com> <laine@laine.org>
<meyering@redhat.com> <jim@meyering.net>
<socketpair@gmail.com> <socketpair gmail com>
<soren@canonical.com> <soren@ubuntu.com>

14
cfg.mk
View File

@ -472,6 +472,20 @@ Makefile: _autogen
endif
endif
# Give credit where due:
# Ensure that each commit author email address (possibly mapped via
# git log's .mailmap) appears in our AUTHORS file.
sc_check_author_list:
@fail=0; \
for i in $$(git log --pretty=format:%aE%n|sort -u|grep -v '^$$'); do \
sanitized=$$(echo "$$i"|LC_ALL=C sed 's/\([^a-zA-Z0-9_@-]\)/\\\1/g'); \
grep -iq "<$$sanitized>" AUTHORS \
|| { printf '%s\n' "$$i" >&2; fail=1; }; \
done; \
test $$fail = 1 \
&& echo '$(ME): committer(s) not listed in AUTHORS' >&2; \
test $$fail = 0
# It is necessary to call autogen any time gnulib changes. Autogen
# reruns configure, then we regenerate all Makefiles at once.
.PHONY: _autogen