[gnome-utils] [build] Generate ChangeLog on dist



commit 07f894bcf3f8b7920a9b29a96cc89b8e841e966d
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Apr 17 17:42:21 2009 +0100

    [build] Generate ChangeLog on dist
    
    Instead of having a real file we can use the Git commit logs to
    generate the ChangeLog during the release process.
    
    This will hopefully force us to use meaningful commit messages.
---
 Makefile.am |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 8a2d832..4f463a7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,6 +41,18 @@ DISTCLEANFILES =                \
 	gtk-doc.make		\
 	gnome-doc-utils.make
 
-DISTCHECK_CONFIGURE_FLAGS = \
-	--disable-scrollkeeper \
-	--enable-gtk-doc
+DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper --enable-gtk-doc
+
+dist-hook:
+	@if test -d "$(srcdir)/.git"; \
+	then \
+		echo Creating ChangeLog && \
+		( cd "$(top_srcdir)" && \
+		  echo '# Generate by configure. Do not edit.'; echo; \
+		  $(top_srcdir)/missing --run git log --stat $$from.. ) > ChangeLog.tmp \
+		&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
+		|| ( rm -f ChangeLog.tmp ; \
+		     echo Failed to generate ChangeLog >&2 ); \
+	else \
+		echo A git clone is required to generate a ChangeLog >&2; \
+	fi



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