Bump to 2.19
[platform/upstream/grep.git] / Makefile.am
index 2be7292..e618a00 100644 (file)
@@ -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