summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2014-04-28 17:51:25 -0700
committerJim Meyering <meyering@fb.com>2014-05-03 16:33:01 -0700
commita159d14c79c86c441e834a513e7b27ea735c26ff (patch)
tree7114ff5d37a6300345157ed102bd87894c8fa7c5 /Makefile.am
parent61c8431a8cb6b6de247e833e1daf69df1d454c96 (diff)
downloadgrep-a159d14c79c86c441e834a513e7b27ea735c26ff.tar.gz
maint: make ChangeLog generation more robust
* Makefile.am (gen-ChangeLog): Sync changes from GNU coreutils, to ensure exit status is propagated, and to support an optional git-log-fix file.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 2be72922..e618a005 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,9 +45,12 @@ gen_start_date = 2009-11-27
.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" \
+ || amend_git_log=; \
$(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