Project Info Name.......: gnu-hello
Description: GNU Hello


gnu-hello       
Info
Commit...:2ba68ee5a514c3e9d378f256abd2ff40393a4990
Author...:Pádraig Brady
Committer:Sami Kerola
Date.....:Sat Apr 19 00:08:57 2014 +0100
Parents..:0a7be309bdfb6c95d5a1f73291eb0969fe67c0da

Message
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.

Changes
diff --git a/Makefile.am b/Makefile.am
line changes: +5/-4
index 5187ebd..5fc61c5
--- 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

This website is licensed under AGPL-3.0. Feel free to copy!