]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: make ChangeLog generation more robust
authorPádraig Brady <P@draigBrady.com>
Sat, 19 Apr 2014 11:45:11 +0000 (12:45 +0100)
committerPádraig Brady <P@draigBrady.com>
Fri, 25 Apr 2014 00:27:07 +0000 (01:27 +0100)
* Makefile.am (gen-ChangeLog): Sync changes from GNU hello,
to ensure exit status is propagated, and to support an optional
git-log-fix file.

Makefile.am

index 8a38acd8cf0ff5f1d582bba7f8926517c22c09f1..7eb2d5cbaa65d97b82a0347bceff0214b7ca03dd 100644 (file)
@@ -105,11 +105,12 @@ gen_start_date = 2008-02-08
 .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
 
 ALL_RECURSIVE_TARGETS += distcheck-hook