From ecc62a03596f4aa1e153ff4648b3ce3ea6873839 Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei.gherzan@huawei.com>
Date: Wed, 24 Mar 2021 11:58:50 +0000
Subject: [PATCH] docs: Wrap building the docs in make

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
 docs/Makefile  | 14 ++++++++++++++
 docs/README.md |  8 ++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)
 create mode 100644 docs/Makefile

diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 00000000..84fac27d
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,14 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+.PHONY: all
+all:
+	sphinx-build -W -C \
+		-D html_theme=sphinx_rtd_theme \
+		-D project='OpenHarmony Build System and meta-ohos' \
+		-D copyright='Huawei Inc' \
+		. build
+
+clean:
+	rm -rf ./build
diff --git a/docs/README.md b/docs/README.md
index 76c5e1dd..71b7861b 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -6,12 +6,16 @@ SPDX-License-Identifier: CC-BY-4.0
 
 # Documentation for meta-ohos
 
-The documentation for `meta-ohos` is written as reST files and can be generated with `sphinx-build` tool:
+The documentation for `meta-ohos` is written as reST files and can be generated
+by using standard make targets:
 
 ```
-sphinx-build -C -D html_theme=sphinx_rtd_theme -D project='OpenHarmony Build System and meta-ohos' -D copyright='Huawei Inc' . build
+make
+make clean
 ```
 
+Building the documentation requires `sphinx-build` to be available on the host.
+
 # License
 
 All the documentation is licensed as `CC-BY-4.0`.
-- 
GitLab