From f314e41f675d8774e34974385d003f3ca68f477c Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Fri, 12 Mar 2021 12:33:08 +1100 Subject: [PATCH] make build system: Produce an error if BUILD_DIR_BASE is a Windows-style path Also fix an issue running menuconfig if BUILD_DIR_BASE is a relative path. Closes https://github.com/espressif/esp-idf/issues/2736 --- make/project.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/make/project.mk b/make/project.mk index f3f1a8220b..8ccdf800d5 100644 --- a/make/project.mk +++ b/make/project.mk @@ -134,6 +134,13 @@ export COMMON_MAKEFILES ifndef BUILD_DIR_BASE BUILD_DIR_BASE := $(PROJECT_PATH)/build endif + +ifneq ("$(BUILD_DIR_BASE)","$(subst :,,$(BUILD_DIR_BASE))") +$(error BUILD_DIR_BASE ($(BUILD_DIR_BASE)) cannot contain colons. If setting this path on Windows, use MSYS Unix-style /c/dir instead of C:/dir) +endif + +BUILD_DIR_BASE := $(abspath $(BUILD_DIR_BASE)) + export BUILD_DIR_BASE # Component directories. These directories are searched for components (either the directory is a component,