>From 5e8f444a859f1f8afb481afcbaff19c7256de4e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Sat, 19 Apr 2014 00:08:57 +0100 Subject: [PATCH] build: make git-log-fix optional in make dist * Makefile.am (gen_changelog): Make git-log-fix optional. Also only remove existing Changelog on successful completion of gitlog-to-changelog and propogate exit status appropriately. --- Makefile.am | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 5187ebd..5fc61c5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -134,9 +134,10 @@ gen_start_date = 2011-12-17 .PHONY: gen-ChangeLog gen-ChangeLog: $(AM_V_GEN)if test -d .git; then \ + log_fix="$(srcdir)/build-aux/git-log-fix"; \ + test -e "$$log_fix" && amend_git_log="--amend=$$log_fix"; \ $(top_srcdir)/build-aux/gitlog-to-changelog \ - --amend=$(srcdir)/build-aux/git-log-fix \ - --since=$(gen_start_date) > $(distdir)/cl-t; \ - rm -f $(distdir)/ChangeLog; \ - mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + $$amend_git_log --since=$(gen_start_date) > $(distdir)/cl-t && \ + { rm -f $(distdir)/ChangeLog && \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; } \ fi -- 1.7.7.6