Make it possible to run make change-history on emacs-25

* Makefile.in: Check if the current branch is emacs-25 instead of
  master.
This commit is contained in:
Nicolas Petton 2016-01-30 10:35:55 +01:00
parent 40a85fba44
commit a4ab2a563a

View file

@ -1089,7 +1089,7 @@ bootstrap: bootstrap-clean
$(MAKE) all
.PHONY: ChangeLog change-history change-history-commit change-history-nocommit
.PHONY: master-branch-is-current unchanged-history-files
.PHONY: emacs-25-branch-is-current unchanged-history-files
CHANGELOG = ChangeLog
emacslog = build-aux/gitlog-to-emacslog
@ -1106,8 +1106,8 @@ ChangeLog:
./$(emacslog) -o $(CHANGELOG) -n $(CHANGELOG_HISTORY_INDEX_MAX)
# Check that we are in a good state for changing history.
master-branch-is-current:
git branch | grep -q '^\* master$$'
emacs-25-branch-is-current:
git branch | grep -q '^\* emacs-25$$'
unchanged-history-files:
x=$$(git diff-files --name-only $(CHANGELOG_N) $(emacslog)) && \
test -z "$$x"
@ -1117,7 +1117,7 @@ new_commit_regexp = ^commit [0123456789abcdef]* (inclusive)
# Copy newer commit messages to the start of the ChangeLog history file,
# and consider them to be older.
change-history-nocommit: master-branch-is-current unchanged-history-files
change-history-nocommit: emacs-25-branch-is-current unchanged-history-files
-rm -f ChangeLog.tmp
$(MAKE) ChangeLog CHANGELOG=ChangeLog.tmp
sed '/^This file records repository revisions/,$$d' \