Skip to content

Commit 2425583

Browse files
Geoffroy Van Cutsemjren1
authored andcommitted
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 <geoffroy.vancutsem@intel.com>
1 parent 0dd3f8d commit 2425583

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ HV_OUT := $(ROOT_OUT)/hypervisor
1010
DM_OUT := $(ROOT_OUT)/devicemodel
1111
TOOLS_OUT := $(ROOT_OUT)/tools
1212
MISC_OUT := $(ROOT_OUT)/misc
13+
DOC_OUT := $(ROOT_OUT)/doc
1314
export TOOLS_OUT
1415

15-
.PHONY: all hypervisor devicemodel tools misc
16+
.PHONY: all hypervisor devicemodel tools misc doc
1617
all: hypervisor devicemodel tools misc
1718

1819
hypervisor:
@@ -36,9 +37,13 @@ misc: tools
3637
mkdir -p $(MISC_OUT)
3738
make -C $(T)/misc OUT_DIR=$(MISC_OUT)
3839

40+
doc:
41+
make -C $(T)/doc html BUILDDIR=$(DOC_OUT)
42+
3943
.PHONY: clean
4044
clean:
4145
make -C $(T)/tools OUT_DIR=$(TOOLS_OUT) clean
46+
make -C $(T)/doc BUILDDIR=$(DOC_OUT) clean
4247
rm -rf $(ROOT_OUT)
4348

4449
.PHONY: install

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ SPHINXOPTS ?= -q
1212
SPHINXBUILD = sphinx-build
1313
SPHINXPROJ = "Project ACRN"
1414
SOURCEDIR = .
15-
BUILDDIR = _build
15+
BUILDDIR ?= _build
1616

1717
DOC_TAG ?= development
1818
RELEASE ?= latest

0 commit comments

Comments
 (0)