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 <thomas.monjalon@6wind.com>
This commit is contained in:
Thomas Monjalon 2014-10-15 22:12:20 +02:00
parent 6b919b0f8c
commit 3fbcfb7619
3 changed files with 26 additions and 2 deletions

3
doc/guides/conf.py Normal file
View File

@ -0,0 +1,3 @@
project = 'DPDK'
master_doc = 'index'

4
doc/guides/index.rst Normal file
View File

@ -0,0 +1,4 @@
DPDK documentation
==================
.. toctree::

View 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