From 2425583c6b31d7d4821e45451d22de9c9bc84b35 Mon Sep 17 00:00:00 2001 From: Geoffroy Van Cutsem Date: Tue, 12 Jun 2018 11:38:43 +0200 Subject: [PATCH] Build system: add target to build documentation This patch adds a new target to build the documentation from the top-level directory. Here is how to use it (from the top-level source directory): $ make doc Or $ make O=build-test doc To clean all documentation build artefacts, simply call $ make clean Or $ make O=build-test clean Calling 'make' with no arguments will *not* build the documentation by default. Signed-off-by: Geoffroy Van Cutsem --- Makefile | 7 ++++++- doc/Makefile | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 54b089e9e..7c3e07353 100644 --- a/Makefile +++ b/Makefile @@ -10,9 +10,10 @@ HV_OUT := $(ROOT_OUT)/hypervisor DM_OUT := $(ROOT_OUT)/devicemodel TOOLS_OUT := $(ROOT_OUT)/tools MISC_OUT := $(ROOT_OUT)/misc +DOC_OUT := $(ROOT_OUT)/doc export TOOLS_OUT -.PHONY: all hypervisor devicemodel tools misc +.PHONY: all hypervisor devicemodel tools misc doc all: hypervisor devicemodel tools misc hypervisor: @@ -36,9 +37,13 @@ misc: tools mkdir -p $(MISC_OUT) make -C $(T)/misc OUT_DIR=$(MISC_OUT) +doc: + make -C $(T)/doc html BUILDDIR=$(DOC_OUT) + .PHONY: clean clean: make -C $(T)/tools OUT_DIR=$(TOOLS_OUT) clean + make -C $(T)/doc BUILDDIR=$(DOC_OUT) clean rm -rf $(ROOT_OUT) .PHONY: install diff --git a/doc/Makefile b/doc/Makefile index bdee93a30..66bbb648c 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -12,7 +12,7 @@ SPHINXOPTS ?= -q SPHINXBUILD = sphinx-build SPHINXPROJ = "Project ACRN" SOURCEDIR = . -BUILDDIR = _build +BUILDDIR ?= _build DOC_TAG ?= development RELEASE ?= latest