Warn if building in the wrong branch.

This commit is contained in:
Julien Palard 2018-09-21 22:13:56 +02:00
parent a96d735316
commit 59648e51e5
1 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,9 @@ JOBS = 4
.PHONY: all
all: $(SPHINX_CONF) $(VENV)/bin/activate
ifneq "$(shell cd $(CPYTHON_CLONE) 2>/dev/null && git describe --contains --all HEAD)" "$(BRANCH)"
$(warning "Your ../cpython checkout is on the wrong branch, got $(shell cd $(CPYTHON_CLONE) 2>/dev/null && git describe --contains --all HEAD) expected $(BRANCH)")
endif
mkdir -p $(CPYTHON_CLONE)/locales/$(LANGUAGE)/
ln -nfs $(shell readlink -f .) $(CPYTHON_CLONE)/locales/$(LANGUAGE)/LC_MESSAGES
$(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)