diff options
author | Glenn Morris <rgm@gnu.org> | 2015-05-06 21:58:58 -0400 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2015-05-06 21:58:58 -0400 |
commit | adb69ddff05ce770261e03d249f2e31e75c098af (patch) | |
tree | 9723ce635e48b1da50b710c88cd4aded816b59a6 | |
parent | 09b872dff4242964daca072472ddfc1dd47cbbc1 (diff) | |
download | emacs-adb69ddff05ce770261e03d249f2e31e75c098af.tar.gz |
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.in | 14 | ||||
-rwxr-xr-x | admin/update_autogen | 2 | ||||
-rwxr-xr-x | build-aux/gitlog-to-emacslog | 5 |
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 .PHONY: ChangeLog change-history change-history-commit change-history-nocommit .PHONY: master-branch-is-current unchanged-history-files -# The newest revision that should not appear in the generated ChangeLog. -gen_origin = 2c1b8604946efbcd8ec5dd6c6dda7541ce4fc3c0 - CHANGELOG = +emacslog = $(srcdir)/build-aux/gitlog-to-emacslog # Convert git commit log to ChangeLog file. make-dist uses this. # I guess this is PHONY because it generates in distprefix (which is @@ -1103,7 +1101,7 @@ CHANGELOG = ChangeLog: @[ -n "${CHANGELOG}" ] || test ! -f ChangeLog $(AM_V_GEN)distprefix=$(distprefix) srcprefix=$(srcdir)/ \ - $(srcdir)/build-aux/gitlog-to-emacslog $(gen_origin) $(CHANGELOG) + $(emacslog) . $(CHANGELOG) # The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ..., # ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX). $(CHANGELOG_N) stands for @@ -1115,7 +1113,7 @@ CHANGELOG_N = ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX) master-branch-is-current: git branch | grep -q '^\* master$$' unchanged-history-files: - x=$$(git diff-files --name-only $(CHANGELOG_N) Makefile.in) && \ + x=$$(git diff-files --name-only $(CHANGELOG_N) $(emacslog)) && \ test -z "$$x" # 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 >$(CHANGELOG_N).tmp rm ChangeLog.tmp new_origin=$$(git log --pretty=format:%H HEAD^!) && \ - sed 's/^\(gen_origin *= *\).*/\1'"$$new_origin/" \ - <Makefile.in >Makefile.in.tmp + sed 's/^\(gen_origin=\).*/\1'"$$new_origin/" \ + < $(emacslog) > $(emacslog).tmp mv $(CHANGELOG_N).tmp $(CHANGELOG_N) - mv Makefile.in.tmp Makefile.in + mv $(emacslog).tmp $(emacslog) change-history: change-history-nocommit $(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= ldefs_in=lisp/loaddefs.el ldefs_out=lisp/ldefs-boot.el changelog_n=$(sed -n 's/CHANGELOG_HISTORY_INDEX_MAX *= *//p' Makefile.in) -changelog_files="ChangeLog.$changelog_n Makefile.in" +changelog_files="ChangeLog.$changelog_n build-aux/gitlog-to-emacslog" sources="configure.ac lib/Makefile.am" ## Files to copy into autogendir. ## 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 @@ LC_ALL=C export LC_ALL -gen_origin=${1?} +# The newest revision that should not appear in the generated ChangeLog. +gen_origin=2c1b8604946efbcd8ec5dd6c6dda7541ce4fc3c0 +test -n "$1" && test "$1" != "." && gen_origin=$1 + output=$2 test -n "$output" || output=ChangeLog |