aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2015-05-06 21:58:58 -0400
committerGlenn Morris2015-05-06 21:58:58 -0400
commitadb69ddff05ce770261e03d249f2e31e75c098af (patch)
tree9723ce635e48b1da50b710c88cd4aded816b59a6
parent09b872dff4242964daca072472ddfc1dd47cbbc1 (diff)
downloademacs-adb69ddff05ce770261e03d249f2e31e75c098af.tar.gz
emacs-adb69ddff05ce770261e03d249f2e31e75c098af.zip
Avoid unnecessary bumping of Makefile.in's timestamp.
* Makefile.in (gen_origin): Move to gitlog-to-emacslog. (emacslog): New variable. (ChangeLog): Use $emacslog. Don't pass $gen_origin. (unchanged-history-files): Use $emacslog rather than Makefile.in. (change-history-nocommit): Store hash in $emacslog. * build-aux/gitlog-to-emacslog (gen_origin): Move default here. * admin/update_autogen (changelog_files): Update for the above.
-rw-r--r--Makefile.in14
-rwxr-xr-xadmin/update_autogen2
-rwxr-xr-xbuild-aux/gitlog-to-emacslog5
3 files changed, 11 insertions, 10 deletions
diff --git a/Makefile.in b/Makefile.in
index c1ed1c31c19..5102575217e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1091,10 +1091,8 @@ 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
1094# The newest revision that should not appear in the generated ChangeLog.
1095gen_origin = 2c1b8604946efbcd8ec5dd6c6dda7541ce4fc3c0
1096
1097CHANGELOG = 1094CHANGELOG =
1095emacslog = $(srcdir)/build-aux/gitlog-to-emacslog
1098 1096
1099# Convert git commit log to ChangeLog file. make-dist uses this. 1097# Convert git commit log to ChangeLog file. make-dist uses this.
1100# 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
@@ -1103,7 +1101,7 @@ CHANGELOG =
1103ChangeLog: 1101ChangeLog:
1104 @[ -n "${CHANGELOG}" ] || test ! -f ChangeLog 1102 @[ -n "${CHANGELOG}" ] || test ! -f ChangeLog
1105 $(AM_V_GEN)distprefix=$(distprefix) srcprefix=$(srcdir)/ \ 1103 $(AM_V_GEN)distprefix=$(distprefix) srcprefix=$(srcdir)/ \
1106 $(srcdir)/build-aux/gitlog-to-emacslog $(gen_origin) $(CHANGELOG) 1104 $(emacslog) . $(CHANGELOG)
1107 1105
1108# The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ..., 1106# The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ...,
1109# ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX). $(CHANGELOG_N) stands for 1107# ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX). $(CHANGELOG_N) stands for
@@ -1115,7 +1113,7 @@ CHANGELOG_N = ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX)
1115master-branch-is-current: 1113master-branch-is-current:
1116 git branch | grep -q '^\* master$$' 1114 git branch | grep -q '^\* master$$'
1117unchanged-history-files: 1115unchanged-history-files:
1118 x=$$(git diff-files --name-only $(CHANGELOG_N) Makefile.in) && \ 1116 x=$$(git diff-files --name-only $(CHANGELOG_N) $(emacslog)) && \
1119 test -z "$$x" 1117 test -z "$$x"
1120 1118
1121# Copy newer commit messages to the start of the ChangeLog history file, 1119# Copy newer commit messages to the start of the ChangeLog history file,
@@ -1126,10 +1124,10 @@ change-history-nocommit: master-branch-is-current unchanged-history-files
1126 >$(CHANGELOG_N).tmp 1124 >$(CHANGELOG_N).tmp
1127 rm ChangeLog.tmp 1125 rm ChangeLog.tmp
1128 new_origin=$$(git log --pretty=format:%H HEAD^!) && \ 1126 new_origin=$$(git log --pretty=format:%H HEAD^!) && \
1129 sed 's/^\(gen_origin *= *\).*/\1'"$$new_origin/" \ 1127 sed 's/^\(gen_origin=\).*/\1'"$$new_origin/" \
1130 <Makefile.in >Makefile.in.tmp 1128 < $(emacslog) > $(emacslog).tmp
1131 mv $(CHANGELOG_N).tmp $(CHANGELOG_N) 1129 mv $(CHANGELOG_N).tmp $(CHANGELOG_N)
1132 mv Makefile.in.tmp Makefile.in 1130 mv $(emacslog).tmp $(emacslog)
1133 1131
1134change-history: change-history-nocommit 1132change-history: change-history-nocommit
1135 $(MAKE) $@-commit 1133 $(MAKE) $@-commit
diff --git a/admin/update_autogen b/admin/update_autogen
index e9d4aa5287c..27d53035502 100755
--- a/admin/update_autogen
+++ b/admin/update_autogen
@@ -94,7 +94,7 @@ changelog_flag=
94ldefs_in=lisp/loaddefs.el 94ldefs_in=lisp/loaddefs.el
95ldefs_out=lisp/ldefs-boot.el 95ldefs_out=lisp/ldefs-boot.el
96changelog_n=$(sed -n 's/CHANGELOG_HISTORY_INDEX_MAX *= *//p' Makefile.in) 96changelog_n=$(sed -n 's/CHANGELOG_HISTORY_INDEX_MAX *= *//p' Makefile.in)
97changelog_files="ChangeLog.$changelog_n Makefile.in" 97changelog_files="ChangeLog.$changelog_n build-aux/gitlog-to-emacslog"
98sources="configure.ac lib/Makefile.am" 98sources="configure.ac lib/Makefile.am"
99## Files to copy into autogendir. 99## Files to copy into autogendir.
100## Everything: 100## Everything:
diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog
index 059cf81abc0..a657cce0b61 100755
--- a/build-aux/gitlog-to-emacslog
+++ b/build-aux/gitlog-to-emacslog
@@ -22,7 +22,10 @@
22LC_ALL=C 22LC_ALL=C
23export LC_ALL 23export LC_ALL
24 24
25gen_origin=${1?} 25# The newest revision that should not appear in the generated ChangeLog.
26gen_origin=2c1b8604946efbcd8ec5dd6c6dda7541ce4fc3c0
27test -n "$1" && test "$1" != "." && gen_origin=$1
28
26output=$2 29output=$2
27test -n "$output" || output=ChangeLog 30test -n "$output" || output=ChangeLog
28 31