summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Davis <mrd@redhat.com>2018-04-06 13:59:20 -0700
committerMatt Davis <mrd@redhat.com>2018-04-06 13:59:20 -0700
commit9b677f3c6ad4bb4216523c0b8719a34f06ed84a8 (patch)
tree7ef5106ebffc15020ba10e5e6e276ea7d32566ec
parente05cad785eeaa0eb84f2ebdb1022f01452779b09 (diff)
downloadansible-temp_docs_via_pypy.tar.gz
Makefile tweaks to allow sphinx run on pypy temp_docs_via_pypy
-rw-r--r--docs/docsite/Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/docs/docsite/Makefile b/docs/docsite/Makefile
index 1e6495c424..a482b52e0f 100644
--- a/docs/docsite/Makefile
+++ b/docs/docsite/Makefile
@@ -5,12 +5,23 @@ TESTING_FORMATTER=../bin/testing_formatter.sh
DUMPER=../bin/dump_keywords.py
CONFIG_DUMPER=../bin/dump_config.py
GENERATE_CLI=../bin/generate_man.py
+SPHINX_PYPY?=no
+
ifeq ($(shell echo $(OS) | egrep -ic 'Darwin|FreeBSD|OpenBSD|DragonFly'),1)
CPUS ?= $(shell sysctl hw.ncpu|awk '{print $$2}')
else
CPUS ?= $(shell nproc)
endif
+ifeq ($(SPHINX_PYPY),yes)
+SPHINXBUILD= \
+"pypy $(shell which sphinx-build)"
+PYTHONPATH=/usr/lib/python2.7/site-packages:/usr/lib64/python2.7/site-packages
+export PYTHONPATH
+else
+SPHINXBUILD=sphinx-build
+endif
+
# Sets the build output directory if it's not already specified
ifndef BUILDDIR
BUILDDIR = _build
@@ -40,10 +51,10 @@ docs: clean htmldocs
generate_rst: staticmin config cli keywords modules plugins testing
htmldocs: generate_rst
- CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx html
+ CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx html SPHINXBUILD=$(SPHINXBUILD)
singlehtmldocs: generate_rst
- CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx singlehtml
+ CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx singlehtml SPHINXBUILD=$(SPHINXBUILD)
webdocs: docs