diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2013-04-08 16:44:59 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2013-04-08 16:46:32 +0100 |
commit | 743e82051c4e46222df190a90de2bfe3b9e71188 (patch) | |
tree | 945cf5e9bdf770e0faaff1a2547ab4b49442b91a | |
parent | 3bf2372b352699cb5eda3e0c6786552ae2a56462 (diff) |
Auto-generate AUTHORS file from GIT logs
Rather than trying to manually keep track of authors,
just auto-generate the list from GIT logs
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | AUTHORS.in (renamed from AUTHORS) | 4 | ||||
-rw-r--r-- | ChangeLog | 0 | ||||
-rw-r--r-- | Makefile.am | 18 | ||||
-rwxr-xr-x | autogen.sh | 5 | ||||
-rw-r--r-- | cfg.mk | 15 |
6 files changed, 23 insertions, 21 deletions
@@ -53,3 +53,5 @@ docs/*.prerequisites docs/*.signals docs/*.types examples/*.1 +AUTHORS +ChangeLog @@ -7,8 +7,6 @@ The primary maintainers of libvirt-designer are: Patches have been received from: - Christophe Fergeau <cfergeau@redhat.com> - Michal Privoznik <mprivozn@redhat.com> - Zeeshan Ali (Khattak) <zeeshanak@gnome.org> +#authorslist# ... send patches to get your name added ... diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index e69de29..0000000 --- a/ChangeLog +++ /dev/null diff --git a/Makefile.am b/Makefile.am index f5bcc47..7801b63 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,17 +6,21 @@ ACLOCAL_AMFLAGS = -I m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libvirt-designer-1.0.pc -EXTRA_DIST = $(PACKAGE).spec $(pkgconfig_DATA:%.pc=%.pc.in) +EXTRA_DIST = \ + $(PACKAGE).spec \ + $(pkgconfig_DATA:%.pc=%.pc.in) \ + AUTHORS.in \ + $(NULL) DISTCLEAN_FILES = $(PACKAGE).spec $(pkgconfig_DATA) DISTCHECK_CONFIGURE_FLAGS = --enable-introspection=yes --enable-gtk-doc=yes -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. -.PHONY: gen-ChangeLog +.PHONY: gen-ChangeLog gen-AUTHORS gen-ChangeLog: if test -d .git || test -d ../.git; then \ $(top_srcdir)/build-aux/gitlog-to-changelog \ @@ -24,3 +28,11 @@ gen-ChangeLog: rm -f $(distdir)/ChangeLog; \ mv $(distdir)/cl-t $(distdir)/ChangeLog; \ fi + +gen-AUTHORS: + $(AM_V_GEN)if test -d $(srcdir)/.git; then \ + out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u`" && \ + perl -p -e "s/#authorslist#// and print '$$out'" \ + < $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \ + mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \ + fi @@ -36,6 +36,11 @@ if test -z "$*"; then echo "the $0 command line." fi +# Real ChangeLog/AUTHORS is auto-generated from GIT logs at +# make dist time, but automake requires that it +# exists at all times :-( +touch ChangeLog AUTHORS + mkdir -p build-aux libtoolize --copy --force aclocal -I m4 @@ -18,7 +18,6 @@ # Tests not to run as part of "make distcheck". local-checks-to-skip = \ changelog-check \ - check-AUTHORS \ makefile-check \ makefile_path_separator_check \ patch-check \ @@ -104,20 +103,6 @@ sc_copyright_format: # We don't use this feature of maint.mk. prev_version_file = /dev/null -# 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>" $(srcdir)/AUTHORS \ - || { printf '%s\n' "$$i" >&2; fail=1; }; \ - done; \ - test $$fail = 1 \ - && echo '$(ME): committer(s) not listed in AUTHORS' >&2; \ - test $$fail = 0 - exclude_file_name_regexp--sc_bindtextdomain = ^(libvirt-designer/test)|(libvirt-designer/libvirt-designer-init-*)|(examples/virtxml.c) |