From 41bc9cf01261882dba3151a615080457b9aa0373 Mon Sep 17 00:00:00 2001 From: "David B. Kinder" Date: Tue, 4 Sep 2018 13:03:50 -0700 Subject: [PATCH] doc: give nicer error if env not set up If one forgets to source the zephyr-env.sh script before starting a doc build (using the top-level Makefile), a long screenful of error messages go by and you can miss what the actual problem is. Check if ZEPHYR_BASE is not set and give a nice short error message. (Updated to a more generic error message in anticipation of #9801 deprecating use of zephyr-env.sh) Signed-off-by: David B. Kinder --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 5dab6363b40..d487e4c5350 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,10 @@ # Top level makefile for things not covered by cmake # +ifndef ZEPHYR_BASE +$(error The ZEPHYR_BASE environment variable must be set) +endif + BUILDDIR ?= doc/_build DOC_TAG ?= development SPHINXOPTS ?= -q