From: "Daniel P. Berrange" <[email protected]>

Rather than trying to manually keep track of authors,
just auto-generate the list from GIT logs

Signed-off-by: Daniel P. Berrange <[email protected]>
---
 .gitignore            |  2 ++
 AUTHORS => AUTHORS.in |  4 +---
 ChangeLog             |  0
 Makefile.am           | 18 +++++++++++++++---
 autogen.sh            |  5 +++++
 cfg.mk                | 15 ---------------
 6 files changed, 23 insertions(+), 21 deletions(-)
 rename AUTHORS => AUTHORS.in (61%)
 delete mode 100644 ChangeLog

diff --git a/.gitignore b/.gitignore
index 03b75ce..6b05db9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,3 +53,5 @@ docs/*.prerequisites
 docs/*.signals
 docs/*.types
 examples/*.1
+AUTHORS
+ChangeLog
diff --git a/AUTHORS b/AUTHORS.in
similarity index 61%
rename from AUTHORS
rename to AUTHORS.in
index 79812d7..334ed3e 100644
--- a/AUTHORS
+++ b/AUTHORS.in
@@ -7,8 +7,6 @@ The primary maintainers of libvirt-designer are:
 
 Patches have been received from:
 
-   Christophe Fergeau       <[email protected]>
-   Michal Privoznik         <[email protected]>
-   Zeeshan Ali (Khattak)    <[email protected]>
+#authorslist#
 
    ... send patches to get your name added ...
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index e69de29..0000000
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
diff --git a/autogen.sh b/autogen.sh
index cf89d7f..9a0c976 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -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
diff --git a/cfg.mk b/cfg.mk
index cf0f61f..54f62d4 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -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)
 
-- 
1.8.1.4

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to