On 10/13/2012 09:01 AM, Cole Robinson wrote:
We add a helper python script build-aux/make-authors.py The .mailmap
is expanded to give output as close to the original AUTHORS file as
possible. Drop the syntax-check that validated AUTHORS is up to date.
AUTHORS.in tracks the maintainers, as well as some folks who were
previously in AUTHORS but don't have a git commit with proper
attribution.
---
.gitignore | 1 +
.mailmap | 13 +++
AUTHORS | 279 ----------------------------------------------
AUTHORS.in | 86 ++++++++++++++
Makefile.am | 12 +-
bootstrap.conf | 3 +-
build-aux/make-authors.py | 44 ++++++++
cfg.mk | 15 ---
8 files changed, 157 insertions(+), 296 deletions(-)
delete mode 100644 AUTHORS
create mode 100644 AUTHORS.in
create mode 100644 build-aux/make-authors.py
Please squash in 'chmod +x build-aux/make-authors.py'.
If someone wants to suggest a perl or shell script replacement I'm all ears.
Or we could just commit to sorting AUTHORS alphabetically and let sort +
uniq do all the work.
I actually like the idea of sorting the list alphabetically, instead of
trying to maintain it in commit order, although that may be harder to
figure out how to include the list from AUTHORS.in of names that
contributed prior to when we had a git log recording their commit.
We've tried hard to make sure that someone can build the tarball without
python installed, but already require python for creating the tarball,
so for now, I have no problem keeping the conversion script in python
(even if I'm not the best one to review it).
+++ b/Makefile.am
@@ -28,6 +28,7 @@ EXTRA_DIST = \
cfg.mk \
examples/domain-events/events-python \
run.in \
+ AUTHORS.in \
$(XML_EXAMPLES)
pkgconfigdir = $(libdir)/pkgconfig
@@ -78,7 +79,7 @@ MAINTAINERCLEANFILES = .git-module-status
# disable this check
distuninstallcheck:
-dist-hook: gen-ChangeLog
+dist-hook: gen-ChangeLog gen-AUTHORS
# Generate the ChangeLog file (with all entries since the switch to git)
# and insert it into the directory we're about to use to create a tarball.
@@ -91,3 +92,12 @@ gen-ChangeLog:
rm -f $(distdir)/ChangeLog; \
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
fi
+
+.PHONY: gen-AUTHORS
+gen-AUTHORS:
+ if test -d .git; then \
+ git log --pretty=format:"%aN@@@%aE" | \
+ python $(top_srcdir)/build-aux/make-authors.py > \
Shouldn't this be $(PYTHON)?
+ $(distdir)/AUTHORS-tmp && \
+ mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \
+ fi
diff --git a/bootstrap.conf b/bootstrap.conf
index f8b7c4d..c40db3d 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -223,7 +223,8 @@ if `(${PYTHON_CONFIG-python-config} --version;
PYTHON_CONFIG=true
fi
-# Automake requires that ChangeLog exist.
+# Automake requires that ChangeLog and AUTHORS exist.
+touch AUTHORS || exit 1
touch ChangeLog || exit 1
Combine these:
touch AUTHORS ChangeLog || exit 1
Overall, I like the idea.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org