Handle pip or Fedora python2/3 RPM install for sphinx-autobuild.
@@ -8,12 +8,15 @@ SPHINXPROJ = Cekit
SOURCEDIR = .
BUILDDIR = _build
+# Handle either python2/3 RPM and PIP based install of sphinx-autobuild
+SPHINXAUTOBUILD := $(shell command -v sphinx-autobuild || command -v sphinx-autobuild-3 2> /dev/null)
+
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
preview: clean
- sphinx-autobuild -b html $(SOURCEDIR) $(BUILDDIR)/html
+ @$(SPHINXAUTOBUILD) -b html $(SOURCEDIR) $(BUILDDIR)/html
.PHONY: help Makefile
@@ -21,4 +24,3 @@ preview: clean
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-
