diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-06-16 19:34:39 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-06-16 19:34:39 +0200 |
commit | b88119d2b5e8e99874eb807f241c7e629d9b48c5 (patch) | |
tree | b16989633990fc0692678afbb56fdd3e6f2a9528 | |
parent | 1cb0b342a222f5bafee6eb365fa136b3239d72b1 (diff) | |
download | python-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-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |