summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-02-14 19:31:46 +0100
committerStefano Karapetsas <[email protected]>2014-02-14 19:31:46 +0100
commit3b00a1d0185e1f396a2057a2ada3559d9e5c9b45 (patch)
tree887b3833aed1348a6fc18263acc766da3f187cce
parent3d00bdb3345fb91f41b8a6f39ccb1d5511b0db7e (diff)
downloadlibmatekbd-3b00a1d0185e1f396a2057a2ada3559d9e5c9b45.tar.bz2
libmatekbd-3b00a1d0185e1f396a2057a2ada3559d9e5c9b45.tar.xz
Add dist-hook for ChangeLog
-rw-r--r--Makefile.am14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index ef22387..ae15bac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,3 +21,17 @@ EXTRA_DIST = \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libmatekbd.pc libmatekbdui.pc
+
+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