Skip to content

Commit 59648e5

Browse files
committed
Warn if building in the wrong branch.
1 parent a96d735 commit 59648e5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ JOBS = 4
2525

2626
.PHONY: all
2727
all: $(SPHINX_CONF) $(VENV)/bin/activate
28+
ifneq "$(shell cd $(CPYTHON_CLONE) 2>/dev/null && git describe --contains --all HEAD)" "$(BRANCH)"
29+
$(warning "Your ../cpython checkout is on the wrong branch, got $(shell cd $(CPYTHON_CLONE) 2>/dev/null && git describe --contains --all HEAD) expected $(BRANCH)")
30+
endif
2831
mkdir -p $(CPYTHON_CLONE)/locales/$(LANGUAGE)/
2932
ln -nfs $(shell readlink -f .) $(CPYTHON_CLONE)/locales/$(LANGUAGE)/LC_MESSAGES
3033
$(MAKE) -C $(CPYTHON_CLONE)/Doc/ VENVDIR=$(VENV) PYTHON=$(PYTHON) SPHINXOPTS='-qaEW -j$(JOBS) -D locale_dirs=../locales -D language=$(LANGUAGE) -D gettext_compact=0 -D latex_engine=xelatex -D latex_elements.inputenc= -D latex_elements.fontenc=' $(MODE)

0 commit comments

Comments
 (0)