From 3b00a1d0185e1f396a2057a2ada3559d9e5c9b45 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Fri, 14 Feb 2014 19:31:46 +0100 Subject: Add dist-hook for ChangeLog --- Makefile.am | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- cgit v1.2.1