From b7ce86ecec6af088e57c79cd594680f7b60b26e1 Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Sat, 14 Nov 2009 15:17:28 +0000 Subject: Automatically create the ChangeLog file from VCS history Added a dist-hook rule to create the ChangeLog file from the git log. --- Makefile.am | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index daf2c9803..ae0e6d8ba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -64,3 +64,17 @@ if GCONF_SCHEMAS_INSTALL done \ fi endif + +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 -- cgit v1.2.1