diff options
author | Glenn Morris <rgm@gnu.org> | 2015-05-06 21:40:28 -0400 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2015-05-06 21:40:28 -0400 |
commit | 09b872dff4242964daca072472ddfc1dd47cbbc1 (patch) | |
tree | e8f9bea6ee782f9c4717c33a554fc714d5bf3b65 | |
parent | 38398844200322e81e20f4fb2ad129b72a0e8a21 (diff) | |
download | emacs-09b872dff4242964daca072472ddfc1dd47cbbc1.tar.gz |
* Makefile.in: Don't always insist on removing existing "ChangeLog".
(CHANGELOG): New variable.
(no-ChangeLog): Remove.
(ChangeLog): Replace "no-ChangeLog"; pass output file to script.
(change-history-nocommit): Use a temp file rather than insisting
on deletion of any existing "ChangeLog".
-rw-r--r-- | Makefile.in | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Makefile.in b/Makefile.in index dc7e8258498..c1ed1c31c19 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1089,15 +1089,21 @@ bootstrap: bootstrap-clean $(MAKE) all .PHONY: ChangeLog change-history change-history-commit change-history-nocommit -.PHONY: master-branch-is-current no-ChangeLog unchanged-history-files +.PHONY: master-branch-is-current unchanged-history-files # The newest revision that should not appear in the generated ChangeLog. gen_origin = 2c1b8604946efbcd8ec5dd6c6dda7541ce4fc3c0 +CHANGELOG = + # Convert git commit log to ChangeLog file. make-dist uses this. +# I guess this is PHONY because it generates in distprefix (which is +# non-nil when called from make-dist)? +# FIXME: test -f does not respect distprefix. ChangeLog: + @[ -n "${CHANGELOG}" ] || test ! -f ChangeLog $(AM_V_GEN)distprefix=$(distprefix) srcprefix=$(srcdir)/ \ - $(srcdir)/build-aux/gitlog-to-emacslog $(gen_origin) + $(srcdir)/build-aux/gitlog-to-emacslog $(gen_origin) $(CHANGELOG) # The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ..., # ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX). $(CHANGELOG_N) stands for @@ -1106,8 +1112,6 @@ CHANGELOG_HISTORY_INDEX_MAX = 2 CHANGELOG_N = ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX) # Check that we are in a good state for changing history. -no-ChangeLog: - test ! -f ChangeLog master-branch-is-current: git branch | grep -q '^\* master$$' unchanged-history-files: @@ -1116,10 +1120,11 @@ unchanged-history-files: # Copy newer commit messages to the start of the ChangeLog history file, # and consider them to be older. -change-history-nocommit: no-ChangeLog master-branch-is-current \ - unchanged-history-files ChangeLog - (sed '/^;; [L]ocal Variables:/,$$d' <ChangeLog && cat $(CHANGELOG_N)) \ +change-history-nocommit: master-branch-is-current unchanged-history-files + $(MAKE) ChangeLog CHANGELOG=ChangeLog.tmp + (sed '/^;; [L]ocal Variables:/,$$d' <ChangeLog.tmp && cat $(CHANGELOG_N)) \ >$(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 |