From 9b677f3c6ad4bb4216523c0b8719a34f06ed84a8 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Fri, 6 Apr 2018 13:59:20 -0700 Subject: Makefile tweaks to allow sphinx run on pypy --- docs/docsite/Makefile | 15 +++++++++++++-- 1 file 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 -- cgit v1.2.1