summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-01-09 11:42:29 +0100
committerinfirit <[email protected]>2014-01-09 11:42:29 +0100
commitdc301b291bfee6e85c0b1c9453d0c90c8f908266 (patch)
tree2eda8a0cca2f8f01ac415ea625b7e7a8c44ca23d
parent2455345e11a5e1f117f41cb076223b485c99533c (diff)
downloadpython-caja-dc301b291bfee6e85c0b1c9453d0c90c8f908266.tar.bz2
python-caja-dc301b291bfee6e85c0b1c9453d0c90c8f908266.tar.xz
Add ChangeLog dist-hook for generation from git
-rw-r--r--Makefile.am14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 01df24c..0f38bf8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,3 +12,17 @@ pkgconfig_DATA = caja-python.pc
EXTRA_DIST = caja-python.pc.in
DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --with-cajadir='$${libdir}/caja/extensions-2.0-distcheck'
+
+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 $(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