From 2e2b96301d74ac931e3e3bbe883f1453cc40eca1 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 6 Feb 2017 15:20:28 +0000 Subject: [PATCH] Generate a ChangeLog for the dist tarball It's useful for people that like rummaging inside tarballs. --- Makefile.am | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile.am b/Makefile.am index f47e5b3..ad83384 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,3 +37,14 @@ EXTRA_DIST = \ registry/glx.xml \ registry/wgl.xml \ $() + +dist-hook: + @if test -d "$(top_srcdir)/.git"; then \ + echo Generating ChangeLog... ; \ + ( $(top_srcdir)/missing --run git log --stat ) > "$(top_srcdir)/ChangeLog.tmp" \ + && mv -f "$(top_srcdir)/ChangeLog.tmp" "$(top_distdir)/ChangeLog" \ + || ( rm -f "$(top_srcdir)/ChangeLog.tmp"; \ + echo Failed to generate ChangeLog >&2 ); \ + else \ + echo A git checkout is required to generate a ChangeLog >&2; \ + fi