mk: generate html guides with sphinx
authorThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 15 Oct 2014 20:12:20 +0000 (22:12 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 15 Oct 2014 20:25:00 +0000 (22:25 +0200)
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 <thomas.monjalon@6wind.com>
doc/guides/conf.py [new file with mode: 0644]
doc/guides/index.rst [new file with mode: 0644]
mk/rte.sdkdoc.mk

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
new file mode 100644 (file)
index 0000000..25978a0
--- /dev/null
@@ -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 (file)
index 0000000..70938be
--- /dev/null
@@ -0,0 +1,4 @@
+DPDK documentation
+==================
+
+.. toctree::
index f305bf9..995daf3 100644 (file)
@@ -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