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


gnu-hello       
Info
Commit...:fb1c5fbd5eee3ab6e3270b6aaf4037bca8ab20bd
Author...:Sami Kerola
Committer:Sami Kerola
Date.....:Sun Apr 20 09:00:36 2014 +0100
Parents..:fa3cc89ceffc336159e888df5889a3f05f9024b2

Message
maint: make ChangeLog generation more robust

* Makefile.am (gen-ChangeLog): Check the git-log-fix file is present
before trying to use it.  This change was made to coreutils by Pádraig
Brady and copied to GNU Hello as-is.
* build-aux/git-log-fix: Add example how to use git-log-fix file.

Changes
diff --git a/Makefile.am b/Makefile.am
line changes: +6/-4
index 5187ebd..15bb46c
--- a/Makefile.am
+++ b/Makefile.am
@@ -134,9 +134,11 @@ 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

diff --git a/build-aux/git-log-fix b/build-aux/git-log-fix
line changes: +6/-0
index af702fe..75675fd
--- a/build-aux/git-log-fix
+++ b/build-aux/git-log-fix
@@ -1,3 +1,9 @@
 # This file is expected to be used via gitlog-to-changelog's --amend=FILE
 # option.  It specifies what changes to make to each given SHA1's commit
 # log and metadata, using Perl-eval'able expressions.
+
+# Here is an example, with leading "#" to comment it out:
+#
+#e480417a611ac479f235d423322fadfc1c99f1d7
+## Use full commit id in title:
+#s/714f2a2/714f2a2cef287c51dfd0b49fad0b8d8830565993/

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