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 .coverage
.noseids .noseids
Kivy.egg-info Kivy.egg-info
@ -11,6 +12,7 @@ Kivy.egg-info
*.kpf *.kpf
build/* build/*
doc/build doc/build
doc/autobuild.py-done*
doc/sources/api-*.rst doc/sources/api-*.rst
kivy/*.c kivy/*.c
kivy/*.pyd kivy/*.pyd

View File

@ -9,19 +9,48 @@ GIT_COMMAND := $(shell which git)
IOSPATH := $(PATH):/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin 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 .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: build:
$(PYTHON) setup.py build_ext --inplace $(PYTHON) setup.py $(BUILD_OPTS)
force: force:
$(PYTHON) setup.py build_ext --inplace -f $(PYTHON) setup.py $(BUILD_OPTS_FORCE)
debug: debug:
$(PYTHON) setup.py build_ext --inplace -f -g $(PYTHON) setup.py $(BUILD_OPTS_DEBUG)
mesabuild: mesabuild:
/usr/bin/env USE_MESAGL=1 $(PYTHON) setup.py build_ext --inplace env USE_MESAGL=1 $(PYTHON) setup.py $(BUILD_OPTS)
ios: ios:
-ln -s $(KIVYIOSROOT)/Python-2.7.1/python -ln -s $(KIVYIOSROOT)/Python-2.7.1/python
@ -43,10 +72,13 @@ ios:
# Copy to python for iOS installation # Copy to python for iOS installation
cp -R "iosbuild/usr/local/lib/python2.7/site-packages/kivy" "$(BUILDROOT)/python/lib/python2.7/site-packages" cp -R "iosbuild/usr/local/lib/python2.7/site-packages/kivy" "$(BUILDROOT)/python/lib/python2.7/site-packages"
pdf: pdf: prebuild
$(MAKE) -C doc pdf cd doc && $(MAKE) pdf
html: html: prebuild
cd doc && $(MAKE) html
html-embedded:
env USE_EMBEDSIGNATURE=1 $(MAKE) force env USE_EMBEDSIGNATURE=1 $(MAKE) force
$(MAKE) -C doc html $(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/*' coverage html --include='$(KIVY_DIR)*' --omit '$(KIVY_DIR)data/*,$(KIVY_DIR)lib/*,$(KIVY_DIR)tools/*,$(KIVY_DIR)tests/*'
install: install:
python setup.py install $(PYTHON) setup.py $(INSTALL_OPTIONS)
clean: clean:
-rm -rf doc/build $(MAKE) -C doc clean
-rm -f kivy-already-built*
-rm -rf build -rm -rf build
-rm -rf htmlcov -rm -rf htmlcov
-rm -f .coverage -rm -f .coverage

View File

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