[eog] [build] Autogenerate ChangeLog on distcheck



commit f2b2d6c8b2a9808fbdc1e8dcaf26805f42dc9e09
Author: Lucas Rocha <lucasr gnome org>
Date:   Tue Aug 11 00:18:12 2009 +0100

    [build] Autogenerate ChangeLog on distcheck

 Makefile.am  |   14 ++++++++++++++
 configure.ac |    3 ++-
 2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 40aea26..7603672 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,3 +37,17 @@ MAINTAINERCLEANFILES = \
 	$(srcdir)/xmldocs.make
 
 -include $(top_srcdir)/git.mk
+
+dist-hook:
+	@if test -d "$(srcdir)/.git"; \
+	then \
+		echo Creating ChangeLog && \
+		( cd "$(top_srcdir)" && \
+		  echo '# Generated by Makefile. Do not edit.'; echo; \
+		  $(top_srcdir)/missing --run git log --stat ) > 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
diff --git a/configure.ac b/configure.ac
index 2a4dba9..9196a4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,8 @@ m4_define(eog_micro_version, 90)
 m4_define(eog_version, eog_major_version.eog_minor_version.eog_micro_version)
 
 AC_INIT([eog], eog_version, [http://bugzilla.gnome.org/enter_bug.cgi?product=eog], [eog])
-AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2])
+AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])
+
 # Support silencing the build output if supported (automake-1.11+)
 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 



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