From 4a6390f5119773709354fdf827fd45d4b60ee421 Mon Sep 17 00:00:00 2001 From: Nicolas Dechesne Date: Mon, 5 Oct 2020 16:32:38 +0200 Subject: sphinx: rename Makefile.sphinx Now that the DocBook files are removed, we can rename the top level Makefile. (From yocto-docs rev: eb412a93ec93b3413e23f028f33bda88f82ac688) Signed-off-by: Nicolas Dechesne (cherry picked from commit 25fefa9a91ba5d7b398443f543e2c46165e8a3f4) Signed-off-by: Nicolas Dechesne Signed-off-by: Richard Purdie --- documentation/Makefile | 35 +++++++++++++++++++++++++++++++++++ documentation/Makefile.sphinx | 35 ----------------------------------- documentation/README | 2 +- 3 files changed, 36 insertions(+), 36 deletions(-) create mode 100644 documentation/Makefile delete mode 100644 documentation/Makefile.sphinx (limited to 'documentation') diff --git a/documentation/Makefile b/documentation/Makefile new file mode 100644 index 0000000000..4d721d30f3 --- /dev/null +++ b/documentation/Makefile @@ -0,0 +1,35 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build +DESTDIR = final + +ifeq ($(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi),0) +$(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed") +endif + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile clean publish + +publish: Makefile html singlehtml + rm -rf $(BUILDDIR)/$(DESTDIR)/ + mkdir -p $(BUILDDIR)/$(DESTDIR)/ + cp -r $(BUILDDIR)/html/* $(BUILDDIR)/$(DESTDIR)/ + cp $(BUILDDIR)/singlehtml/index.html $(BUILDDIR)/$(DESTDIR)/singleindex.html + sed -i -e 's@index.html#@singleindex.html#@g' $(BUILDDIR)/$(DESTDIR)/singleindex.html + +clean: + @rm -rf $(BUILDDIR) + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/documentation/Makefile.sphinx b/documentation/Makefile.sphinx deleted file mode 100644 index c9518558bb..0000000000 --- a/documentation/Makefile.sphinx +++ /dev/null @@ -1,35 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = . -BUILDDIR = _build -DESTDIR = final - -ifeq ($(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi),0) -$(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed") -endif - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile.sphinx clean publish - -publish: Makefile.sphinx html singlehtml - rm -rf $(BUILDDIR)/$(DESTDIR)/ - mkdir -p $(BUILDDIR)/$(DESTDIR)/ - cp -r $(BUILDDIR)/html/* $(BUILDDIR)/$(DESTDIR)/ - cp $(BUILDDIR)/singlehtml/index.html $(BUILDDIR)/$(DESTDIR)/singleindex.html - sed -i -e 's@index.html#@singleindex.html#@g' $(BUILDDIR)/$(DESTDIR)/singleindex.html - -clean: - @rm -rf $(BUILDDIR) - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile.sphinx - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/documentation/README b/documentation/README index fce3cfe17e..fe86876ee7 100644 --- a/documentation/README +++ b/documentation/README @@ -121,7 +121,7 @@ To install all required packages run: To build the documentation locally, run: $ cd documentation - $ make -f Makefile.sphinx html + $ make html The resulting HTML index page will be _build/html/index.html, and you can browse your own copy of the locally generated documentation with -- cgit v1.2.3-54-g00ecf