From e251196cc7c6e6a048e90af0918772f97076e190 Mon Sep 17 00:00:00 2001 From: R Veera Kumar Date: Sat, 5 Jun 2021 01:38:12 +0530 Subject: [PATCH] Add Makefile modified for sphinx --- Makefile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Makefile b/Makefile index 0e4eb51..5a57e58 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ PYTHON3 ?= "python3" +.PHONY: help Makefile install test htmlupload + install: $(PYTHON3) setup.py develop # yes, develop, not install @@ -8,3 +10,30 @@ test: pypiupload: $(PYTHON3) setup.py sdist upload + +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +SPHINXPROJ = nmutil +SOURCEDIR = . +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +# copies all documentation to libre-soc (libre-soc admins only) +htmlupload: clean html + rsync -HPavz --delete build/html/* \ + libre-soc.org:/var/www/libre-soc.org/docs/nmutil/ + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + echo "catch-all falling through to sphinx for document building" + mkdir -p "$(SOURCEDIR)"/src/gen + sphinx-apidoc --ext-autodoc -o "$(SOURCEDIR)"/src/gen ./src/nmutil + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -- 2.30.2