[libgda] Added a dist hook to generate the ChangeLog



commit 42ba93b4bf620287ae2f97752fbe86510de8fbf3
Author: Vivien Malerba <malerba gnome-db org>
Date:   Mon Aug 24 18:46:19 2009 +0200

    Added a dist hook to generate the ChangeLog

 Makefile.am |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 98b15ee..c1fbb5d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -81,11 +81,11 @@ example_files = \
 	samples/Tree/README \
 	samples/Tree/example.c \
 	samples/SqlBuilder/Makefile \
-        samples/SqlBuilder/README \
-        samples/SqlBuilder/example.c \
+	samples/SqlBuilder/README \
+	samples/SqlBuilder/example.c \
 	samples/AsyncExec/Makefile \
-        samples/AsyncExec/README \
-        samples/AsyncExec/example.c \
+	samples/AsyncExec/README \
+	samples/AsyncExec/example.c \
 	samples/WritableSelect/README \
 	samples/WritableSelect/example.c \
 	samples/WritableSelect/Makefile
@@ -101,6 +101,20 @@ EXTRA_DIST = \
 	getsp.class \
 	getsp.java
 
+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 -w eb0a68166a0b08c369a1acd8ebbde6e939d30d67.. --pretty=format:"%cd  %an <%ae>%n%n%s%n%n%b%n" --date=short ) > 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
+
 pkgconfigdir=$(libdir)/pkgconfig
 pkgconfig_DATA = libgda-$(GDA_ABI_VERSION).pc libgda-report-$(GDA_ABI_VERSION).pc $(XSLT_PC) $(UI_PC)
 



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