[libpeas] Add a rule to autogenerate a changelog.



commit 84b64723bcf0d248676c36b55a80111e958f7c87
Author: Steve Frécinaux <code istique net>
Date:   Mon Oct 4 10:01:24 2010 +0200

    Add a rule to autogenerate a changelog.

 Makefile.am  |   14 ++++++++++++++
 configure.ac |    2 +-
 2 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 8e4b8d5..0cd774c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,3 +9,17 @@ SUBDIRS += libpeas-gtk peas-demo
 endif
 
 SUBDIRS += data po docs
+
+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 6e5a553..ed26f29 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@ AC_SUBST(PEAS_MICRO_VERSION, peas_micro_version)
 
 AC_SUBST(PEAS_VERSION, peas_version)
 
-AM_INIT_AUTOMAKE([1.11 dist-bzip2 no-dist-gzip -Wno-portability])
+AM_INIT_AUTOMAKE([1.11 foreign dist-bzip2 no-dist-gzip -Wno-portability])
 AM_MAINTAINER_MODE([enable])
 
 AM_SILENT_RULES([yes])



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