From 01f146c28e3c0d4dd9844c7b454b37aa4d12f45b Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 27 May 2013 04:41:58 +0200 Subject: [PATCH] build: Handle the ChangeLog as a distributed-only file The ChangeLog file is distributed, and cannot be regenerated outside of the git repository, so do not remove it in DISTCLEANFILES, and move the generation code into dist-hook, which also avoids unnecessary computation during normal builds. --- Makefile.am | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index ae7cd20..8e50b1d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,11 +9,8 @@ EXTRA_DIST = \ get-version \ $(nil) -DISTCLEANFILES = ChangeLog -.PHONY: ChangeLog - -ChangeLog: - git log --stat -C >$@ - dist-hook: echo $(VERSION) >$(distdir)/.dist-version + if [ -d .git ]; then \ + git log --stat -C >$(distdir)/ChangeLog; \ + fi -- 2.47.3