From 3fbcfb76190f322f9c15bcc0057a437bc42775c8 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Wed, 15 Oct 2014 22:12:20 +0200 Subject: [PATCH] mk: generate html guides with sphinx Add minimal configuration and index to validate new rules inside "make doc" and "make doc-clean". RTE_SPHINX_BUILD can be overriden. Signed-off-by: Thomas Monjalon --- doc/guides/conf.py | 3 +++ doc/guides/index.rst | 4 ++++ mk/rte.sdkdoc.mk | 21 +++++++++++++++++++-- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 doc/guides/conf.py create mode 100644 doc/guides/index.rst diff --git a/doc/guides/conf.py b/doc/guides/conf.py new file mode 100644 index 0000000000..25978a0fba --- /dev/null +++ b/doc/guides/conf.py @@ -0,0 +1,3 @@ +project = 'DPDK' + +master_doc = 'index' diff --git a/doc/guides/index.rst b/doc/guides/index.rst new file mode 100644 index 0000000000..70938be97d --- /dev/null +++ b/doc/guides/index.rst @@ -0,0 +1,4 @@ +DPDK documentation +================== + +.. toctree:: diff --git a/mk/rte.sdkdoc.mk b/mk/rte.sdkdoc.mk index f305bf98e8..995daf3dd3 100644 --- a/mk/rte.sdkdoc.mk +++ b/mk/rte.sdkdoc.mk @@ -36,16 +36,24 @@ $(error "Cannot use T= with doc target") endif endif +RTE_SPHINX_BUILD = sphinx-build +ifndef V +RTE_SPHINX_VERBOSE := -q +endif +ifeq '$V' '0' +RTE_SPHINX_VERBOSE := -q +endif + .PHONY: help help: @cat $(RTE_SDK)/doc/build-sdk-quick.txt @$(MAKE) -rR showconfigs | sed 's,^,\t\t\t\t,' .PHONY: all -all: api-html +all: api-html guides-html .PHONY: clean -clean: api-html-clean +clean: api-html-clean guides-html-clean .PHONY: api-html api-html: api-html-clean @@ -62,7 +70,16 @@ api-html: api-html-clean doxygen - $(Q)$(RTE_SDK)/doc/api/doxy-html-custom.sh $(RTE_OUTPUT)/doc/html/api/doxygen.css +guides-%: + @echo 'sphinx for guides...' + $(Q)$(RTE_SPHINX_BUILD) -b $* $(RTE_SPHINX_VERBOSE) \ + -c $(RTE_SDK)/doc/guides $(RTE_SDK)/doc/guides $(RTE_OUTPUT)/doc/$*/guides + .PHONY: api-html-clean api-html-clean: $(Q)rm -f $(RTE_OUTPUT)/doc/html/api/* $(Q)rmdir -p --ignore-fail-on-non-empty $(RTE_OUTPUT)/doc/html/api 2>&- || true + +guides-%-clean: + $(Q)rm -rf $(RTE_OUTPUT)/doc/$*/guides + $(Q)rmdir -p --ignore-fail-on-non-empty $(RTE_OUTPUT)/doc/$* 2>&- || true -- 2.20.1