summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-06-16 19:34:39 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-06-16 19:34:39 +0200
commitb88119d2b5e8e99874eb807f241c7e629d9b48c5 (patch)
treeb16989633990fc0692678afbb56fdd3e6f2a9528
parent1cb0b342a222f5bafee6eb365fa136b3239d72b1 (diff)
downloadpython-systemd-b88119d2b5e8e99874eb807f241c7e629d9b48c5.tar.gz
make: fix "make doc" invocations
python insists on adding . to python.path, so we always import the systemd in the top-level directory instead of the one in build/ that we want. Let's cd into docs/ first, so that we get the right module imported. Also, replace sphinx-build calls with $(PYTHON) -m sphinx. This has the advantage that once $(PYTHON) is set, the appropriate sphinx executable is chosen.
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2d2eedf..6d6f749 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,5 @@
PYTHON = python
SED = sed
-SPHINX_BUILD = sphinx-build
ETAGS = etags
INCLUDE_DIR := $(shell pkg-config --variable=includedir libsystemd)
INCLUDE_FLAGS := $(shell pkg-config --cflags libsystemd)
@@ -53,7 +52,8 @@ distclean: clean
SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
sphinx-%: build
- PYTHONPATH=$(builddir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) docs build/$*
+ cd build && \
+ PYTHONPATH=../$(builddir) $(PYTHON) -m sphinx -b $* $(SPHINXOPTS) ../docs $*
@echo Output has been generated in build/$*
doc: sphinx-html