From cf29471258952517c8870106182f6c1aa2a8b0f2 Mon Sep 17 00:00:00 2001
From: Philippe Coval <philippe.coval@huawei.com>
Date: Mon, 2 Aug 2021 15:33:30 +0200
Subject: [PATCH] docs: Add helper makefile

It worked for me on latest ubuntu,
and can adapter for other distros

Forwarded: https://booting.oniroproject.org/distro/oniro/-/merge_requests/375
Relate-to: https://git.ostc-eu.org/OSTC/OHOS/meta-ohos/-/merge_requests/235
Signed-off-by: Philippe Coval <philippe.coval@huawei.com>
---
 docs/Makefile | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/docs/Makefile b/docs/Makefile
index 9d7f5321..8e501e9d 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -2,9 +2,29 @@
 #
 # SPDX-License-Identifier: Apache-2.0
 
+default: help all
+
+sudo ?=
+
+
 .PHONY: all
+
+help:
+	@echo "Usage: "
+	@echo "make all # to build HTML from rst sources"
+	@echo "make clean # to cleanup"
+	@echo "make setup/debian sudo=sudo # To install build tools (on debian and derived)"
+
 all:
 	sphinx-build -W . build
 
 clean:
 	rm -rf ./build
+
+setup/debian: /etc/debian_version
+	${sudo} apt-get install -y \
+make \
+python3-sphinx-tabs \
+python3-sphinxcontrib.plantuml \
+python3-dask-sphinx-theme \
+# EOL
-- 
GitLab