[gnome-music] Auto-generate AUTHORS file from GIT logs



commit 28431494ad908f5522616269cb131c26f308935e
Author: Fabiano Fidêncio <fidencio redhat com>
Date:   Sun Jun 23 22:07:36 2013 +0200

    Auto-generate AUTHORS file from GIT logs
    
    Patch based on:
    https://www.redhat.com/archives/virt-tools-list/2013-February/msg00106.html
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702917

 AUTHORS.in  |   21 +++++++++++++++++++++
 Makefile.am |   26 ++++++++++++++++++++++++--
 autogen.sh  |    1 +
 3 files changed, 46 insertions(+), 2 deletions(-)
---
diff --git a/AUTHORS.in b/AUTHORS.in
new file mode 100644
index 0000000..0d897b1
--- /dev/null
+++ b/AUTHORS.in
@@ -0,0 +1,21 @@
+    GNOME Music Authors
+    ===================
+
+GNOME Music was initially written by:
+
+    César García Tapia <cesar garcia tapia openshine com>
+    Seif Lotfy <seif lotfy com>
+    Vadim Rutkovsky <vrutkovs redhat com>
+
+GNOME Music is currently maintained by:
+
+    Seif Lotfy <seif lotfy com>
+    Vadim Rutkovsky <vrutkovs redhat com>
+
+Patches have been received from:
+
+#authorslist#
+
+    ... send patches to get your name here ...
+
+-- End
diff --git a/Makefile.am b/Makefile.am
index 987dab2..f98e024 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,8 +1,17 @@
 ACLOCAL_AMFLAGS = -I m4 -I libgd
+NULL =
 
 SUBDIRS = po libgd src data tests
 
+EXTRA_DIST = \
+       AUTHORS.in \
+       $(NULL)
+
+CLEANFILES = \
+       $(NULL)
+
 MAINTAINERCLEANFILES = \
+       $(srcdir)/AUTHORS \
        $(srcdir)/INSTALL \
        $(srcdir)/aclocal.m4 \
        $(srcdir)/autoscan.log \
@@ -15,8 +24,21 @@ MAINTAINERCLEANFILES = \
        $(srcdir)/install-sh \
        $(srcdir)/ltmain.sh \
        $(srcdir)/missing \
-       $(srcdir)/mkinstalldirs
+       $(srcdir)/mkinstalldirs \
+       $(NULL)
+
+GITIGNOREFILES = \
+       m4 \
+       $(NULL)
+
+dist-hook: gen-AUTHORS
 
-GITIGNOREFILES = m4/
+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
 
 -include $(top_srcdir)/git.mk
diff --git a/autogen.sh b/autogen.sh
index 5f239c0..6a36f45 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -23,4 +23,5 @@ which gnome-autogen.sh || {
 test -d m4 || mkdir m4/ ;
 git submodule update --init --recursive ;
 )
+touch AUTHORS
 . gnome-autogen.sh


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]