aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in7
-rwxr-xr-xbuild-aux/gitlog-to-emacslog23
2 files changed, 20 insertions, 10 deletions
diff --git a/Makefile.in b/Makefile.in
index e8780c22d4a..7ae81b0b217 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1091,17 +1091,15 @@ bootstrap: bootstrap-clean
1091.PHONY: ChangeLog change-history change-history-commit change-history-nocommit 1091.PHONY: ChangeLog change-history change-history-commit change-history-nocommit
1092.PHONY: master-branch-is-current unchanged-history-files 1092.PHONY: master-branch-is-current unchanged-history-files
1093 1093
1094CHANGELOG = 1094CHANGELOG = ChangeLog
1095emacslog = $(srcdir)/build-aux/gitlog-to-emacslog 1095emacslog = $(srcdir)/build-aux/gitlog-to-emacslog
1096 1096
1097# Convert git commit log to ChangeLog file. make-dist uses this. 1097# Convert git commit log to ChangeLog file. make-dist uses this.
1098# I guess this is PHONY because it generates in distprefix (which is 1098# I guess this is PHONY because it generates in distprefix (which is
1099# non-nil when called from make-dist)? 1099# non-nil when called from make-dist)?
1100# FIXME: test -f does not respect distprefix.
1101ChangeLog: 1100ChangeLog:
1102 @[ -n "${CHANGELOG}" ] || test ! -f ChangeLog
1103 $(AM_V_GEN)distprefix=$(distprefix) srcprefix=$(srcdir)/ \ 1101 $(AM_V_GEN)distprefix=$(distprefix) srcprefix=$(srcdir)/ \
1104 $(emacslog) . $(CHANGELOG) 1102 $(emacslog) -o $(CHANGELOG)
1105 1103
1106# The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ..., 1104# The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ...,
1107# ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX). $(CHANGELOG_N) stands for 1105# ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX). $(CHANGELOG_N) stands for
@@ -1119,6 +1117,7 @@ unchanged-history-files:
1119# Copy newer commit messages to the start of the ChangeLog history file, 1117# Copy newer commit messages to the start of the ChangeLog history file,
1120# and consider them to be older. 1118# and consider them to be older.
1121change-history-nocommit: master-branch-is-current unchanged-history-files 1119change-history-nocommit: master-branch-is-current unchanged-history-files
1120 -rm -f ChangeLog.tmp
1122 $(MAKE) ChangeLog CHANGELOG=ChangeLog.tmp 1121 $(MAKE) ChangeLog CHANGELOG=ChangeLog.tmp
1123 (sed '/^;; [L]ocal Variables:/,$$d' <ChangeLog.tmp && cat $(CHANGELOG_N)) \ 1122 (sed '/^;; [L]ocal Variables:/,$$d' <ChangeLog.tmp && cat $(CHANGELOG_N)) \
1124 >$(CHANGELOG_N).tmp 1123 >$(CHANGELOG_N).tmp
diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog
index a657cce0b61..2e5741c16f6 100755
--- a/build-aux/gitlog-to-emacslog
+++ b/build-aux/gitlog-to-emacslog
@@ -24,15 +24,26 @@ export LC_ALL
24 24
25# The newest revision that should not appear in the generated ChangeLog. 25# The newest revision that should not appear in the generated ChangeLog.
26gen_origin=2c1b8604946efbcd8ec5dd6c6dda7541ce4fc3c0 26gen_origin=2c1b8604946efbcd8ec5dd6c6dda7541ce4fc3c0
27test -n "$1" && test "$1" != "." && gen_origin=$1 27force=
28 28output=ChangeLog
29output=$2 29
30test -n "$output" || output=ChangeLog 30while [ $# -gt 0 ]; do
31 case "$1" in
32 -g|--gen-origin) gen_origin="$2" ; shift ;;
33 -f|--force) force=1 ;;
34 -o|--output) output="$2" ; shift ;;
35 *) echo "Unrecognized argument: $1" >&2; exit 1 ;;
36 esac
37 shift
38done
39
40if [ -f "${distprefix}$output" ]; then
41 [ ! "$force" ] && echo "${distprefix}$output exists" && exit 1
42 rm -f "${distprefix}$output" || exit 1
43fi
31 44
32# If this is not a Git repository, just generate an empty ChangeLog. 45# If this is not a Git repository, just generate an empty ChangeLog.
33test -d ${srcprefix}.git || { 46test -d ${srcprefix}.git || {
34 # Remove any old ChangeLog, in case it is a vc-dwim symlink.
35 rm -f "${distprefix}$output" || exit
36 >"${distprefix}$output" 47 >"${distprefix}$output"
37 exit 48 exit
38} 49}