emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 950c002: Improve 'make change-history' prereq tests


From: Paul Eggert
Subject: [Emacs-diffs] master 950c002: Improve 'make change-history' prereq tests
Date: Sun, 12 Apr 2015 18:09:02 +0000

branch: master
commit 950c0027cb4018c79d8f429007920ac279431cd4
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Improve 'make change-history' prereq tests
    
    * Makefile.in (gen_origin): Fix to match what's in the master branch.
    (no-ChangeLog, master-branch-is-current): New rules.
    (change-history): Depend on them, to avoid similar future problems.
    Escape the local-variables string to pacify Emacs when editing
    Makefile.in.
---
 Makefile.in |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 9f235d5..0830dda 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1088,7 +1088,7 @@ bootstrap: bootstrap-clean
        $(MAKE) all
 
 # The newest revision that should not appear in the generated ChangeLog.
-gen_origin = 2cdbb8983dd49ce5c31c74b26f740bcb3e5a4c5d
+gen_origin = 3311ace9c54a50b83a838e2eb7fa9565176e0c4f
 # Convert git commit log to ChangeLog file.  make-dist uses this.
 .PHONY: ChangeLog change-history unchanged-history-files
 ChangeLog:
@@ -1101,16 +1101,20 @@ ChangeLog:
 CHANGELOG_HISTORY_INDEX_MAX = 1
 CHANGELOG_N = ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX)
 
-# Check that history-relevant files match what's in the repository.
-# Otherwise, 'make change-history' might mess up the ChangeLog history files.
+# 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:
        x=$$(git diff-files --name-only $(CHANGELOG_N) Makefile.in) && \
          test -z "$$x"
 
 # Copy newer commit messages to the start of the ChangeLog history file,
 # and consider them to be older.
-change-history: ChangeLog unchanged-history-files
-       (sed '/^;; Local Variables:/,$$d' <ChangeLog && cat $(CHANGELOG_N)) \
+change-history: no-ChangeLog master-branch-is-current unchanged-history-files \
+  ChangeLog
+       (sed '/^;; [L]ocal Variables:/,$$d' <ChangeLog && cat $(CHANGELOG_N)) \
          >$(CHANGELOG_N).tmp
        new_origin=$$(git log --pretty=format:%H HEAD^!) && \
        sed 's/^\(gen_origin *= *\).*/\1'"$$new_origin/" \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]