Merge pull request #2900 from thopiekar/make-doc-build-failsave

Make doc build failsave
This commit is contained in:
dessant 2015-01-25 18:53:28 +02:00
commit f18ecef089
3 changed files with 81 additions and 9 deletions

2
.gitignore vendored
View File

@ -1,3 +1,4 @@
kivy-already-built*
.coverage
.noseids
Kivy.egg-info
@ -11,6 +12,7 @@ Kivy.egg-info
*.kpf
build/*
doc/build
doc/autobuild.py-done*
doc/sources/api-*.rst
kivy/*.c
kivy/*.pyd

View File

@ -9,19 +9,48 @@ GIT_COMMAND := $(shell which git)
IOSPATH := $(PATH):/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
BUILD_OPTS = build_ext --inplace
BUILD_OPTS_FORCE = $(BUILD_OPTS) -f
BUILD_OPTS_DEBUG = $(BUILD_OPTS_FORCE)-g
INSTALL_OPTIONS = install
INSTALL_ROOT =
INSTALL_PREFIX =
INSTALL_LAYOUT =
ifneq ($(INSTALL_ROOT),)
INSTALL_OPTIONS += --root=$(INSTALL_ROOT)
endif
ifneq ($(INSTALL_PREFIX),)
INSTALL_OPTIONS += --prefix=$(INSTALL_PREFIX)
endif
ifneq ($(INSTALL_LAYOUT),)
INSTALL_OPTIONS += --install-layout=$(INSTALL_LAYOUT)
endif
.PHONY: build force mesabuild pdf style stylereport hook test batchtest cover clean distclean theming
prebuild:
ifeq ("$(wildcard kivy-already-built-for-$(PYTHON))","")
@echo Building Kivy as it is not already done!
$(PYTHON) setup.py $(BUILD_OPTS)
touch kivy-already-built-for-$(PYTHON)
else
@echo Kivy is already built for \"$(PYTHON)\"!
endif
build:
$(PYTHON) setup.py build_ext --inplace
$(PYTHON) setup.py $(BUILD_OPTS)
force:
$(PYTHON) setup.py build_ext --inplace -f
$(PYTHON) setup.py $(BUILD_OPTS_FORCE)
debug:
$(PYTHON) setup.py build_ext --inplace -f -g
$(PYTHON) setup.py $(BUILD_OPTS_DEBUG)
mesabuild:
/usr/bin/env USE_MESAGL=1 $(PYTHON) setup.py build_ext --inplace
env USE_MESAGL=1 $(PYTHON) setup.py $(BUILD_OPTS)
ios:
-ln -s $(KIVYIOSROOT)/Python-2.7.1/python
@ -43,10 +72,13 @@ ios:
# Copy to python for iOS installation
cp -R "iosbuild/usr/local/lib/python2.7/site-packages/kivy" "$(BUILDROOT)/python/lib/python2.7/site-packages"
pdf:
$(MAKE) -C doc pdf
pdf: prebuild
cd doc && $(MAKE) pdf
html:
html: prebuild
cd doc && $(MAKE) html
html-embedded:
env USE_EMBEDSIGNATURE=1 $(MAKE) force
$(MAKE) -C doc html
@ -70,9 +102,11 @@ cover:
coverage html --include='$(KIVY_DIR)*' --omit '$(KIVY_DIR)data/*,$(KIVY_DIR)lib/*,$(KIVY_DIR)tools/*,$(KIVY_DIR)tests/*'
install:
python setup.py install
$(PYTHON) setup.py $(INSTALL_OPTIONS)
clean:
-rm -rf doc/build
$(MAKE) -C doc clean
-rm -f kivy-already-built*
-rm -rf build
-rm -rf htmlcov
-rm -f .coverage

View File

@ -37,6 +37,9 @@ else
_TESTS = _TEST
endif
AUTOBUILD_STAMP_BASE = autobuild.py-done-with-
AUTOBUILD_STAMP = $(AUTOBUILD_STAMP_BASE)$(PYTHON)
.PHONY: help clean html web pickle htmlhelp latex changes linkcheck gettext
help:
@ -56,18 +59,25 @@ ifdef ComSpec
-rmdir /s /q build
else
-rm -rf build/*
-rm $(AUTOBUILD_STAMP_BASE)*
endif
html:
$(MKDIR) build$(P)html build$(P)doctrees
ifeq ("$(wildcard $(AUTOBUILD_STAMP))","")
$(PYTHON) autobuild.py silenced=$(ENDUSER_BUILD)
touch $(AUTOBUILD_STAMP)
endif
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS$(_TESTS)) build/html
@echo
@echo "Build finished. The HTML pages are in build/html."
gettext:
$(MKDIR) build$(P)html build$(P)doctrees_gettext
ifeq ("$(wildcard $(AUTOBUILD_STAMP))","")
$(PYTHON) autobuild.py silenced=$(ENDUSER_BUILD)
touch $(AUTOBUILD_STAMP)
endif
$(SPHINXBUILD) -b gettext $(ALLSPHINXOPTSGT$(_TESTS)) build/gettext
@echo
@echo "Build finished. The Gettext pages are in build/gettext."
@ -75,7 +85,10 @@ gettext:
pickle:
$(MKDIR) build$(P)pickle build$(P)doctrees
ifeq ("$(wildcard $(AUTOBUILD_STAMP))","")
$(PYTHON) autobuild.py silenced=$(ENDUSER_BUILD)
touch $(AUTOBUILD_STAMP)
endif
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS$(_TESTS)) build/pickle
@echo
@echo "Build finished; now you can process the pickle files or run"
@ -86,7 +99,10 @@ web: pickle
htmlhelp:
$(MKDIR) build$(P)htmlhelp build$(P)doctrees
ifeq ("$(wildcard $(AUTOBUILD_STAMP))","")
$(PYTHON) autobuild.py silenced=$(ENDUSER_BUILD)
touch $(AUTOBUILD_STAMP)
endif
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS$(_TESTS)) build/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
@ -94,7 +110,10 @@ htmlhelp:
latex:
$(MKDIR) build$(P)latex build$(P)doctrees
ifeq ("$(wildcard $(AUTOBUILD_STAMP))","")
$(PYTHON) autobuild.py silenced=$(ENDUSER_BUILD)
touch $(AUTOBUILD_STAMP)
endif
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS$(_TESTS)) build/latex
@echo
@echo "Build finished; the LaTeX files are in build/latex."
@ -107,6 +126,7 @@ pdf: latex
ifneq ("$(wildcard build$(P)latex$(P)Kivy.pdf)","")
@echo
@echo "Build finished; the PDF file(s) are in build/latex."
@echo "You can savely ignore the errors which might appeared above!"
else
@echo
@echo "Build failed; there is no PDF file(s) in build/latex."
@ -118,16 +138,32 @@ ps: latex
@echo
@echo "Build finished; the PS files are in build/latex."
man:
$(MKDIR) build$(P)man build$(P)doctrees
ifeq ("$(wildcard $(AUTOBUILD_STAMP))","")
$(PYTHON) autobuild.py silenced=$(ENDUSER_BUILD)
touch $(AUTOBUILD_STAMP)
endif
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS$(_TESTS)) build/man
@echo
@echo "Build finished. The manual pages are in build/man."
changes:
$(MKDIR) build$(P)changes build$(P)doctrees
ifeq ("$(wildcard $(AUTOBUILD_STAMP))","")
$(PYTHON) autobuild.py silenced=$(ENDUSER_BUILD)
touch $(AUTOBUILD_STAMP)
endif
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS$(_TESTS)) build/changes
@echo
@echo "The overview file is in build/changes."
linkcheck:
$(MKDIR) build$(P)linkcheck build$(P)doctrees
ifeq ("$(wildcard $(AUTOBUILD_STAMP))","")
$(PYTHON) autobuild.py silenced=$(ENDUSER_BUILD)
touch $(AUTOBUILD_STAMP)
endif
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS$(_TESTS)) build/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \