mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 08:04:33 +02:00
Merge branch 'bugfix/build_system_tilde' into 'master'
Build system: Allow IDF_PATH to contain ~ or C:/ See github issues * https://github.com/espressif/esp-idf/issues/118 * https://github.com/espressif/esp-idf/issues/166 (This is easier to work around in the build system than to document.) See merge request !315
This commit is contained in:
@@ -45,6 +45,27 @@ $(warning "esp-idf build system only supports GNU Make versions 3.81 or newer. Y
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# make IDF_PATH a "real" absolute path
|
||||||
|
# * works around the case where a shell character is embedded in the environment variable value.
|
||||||
|
# * changes Windows-style C:/blah/ paths to MSYS/Cygwin style /c/blah
|
||||||
|
export IDF_PATH:=$(realpath $(wildcard $(IDF_PATH)))
|
||||||
|
|
||||||
|
ifndef IDF_PATH
|
||||||
|
$(error IDF_PATH variable is not set to a valid directory.)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ("$(IDF_PATH)","$(realpath $(wildcard $(IDF_PATH)))")
|
||||||
|
# due to the way make manages variables, this is hard to account for
|
||||||
|
#
|
||||||
|
# if you see this error, do the shell expansion in the shell ie
|
||||||
|
# make IDF_PATH=~/blah not make IDF_PATH="~/blah"
|
||||||
|
$(error If IDF_PATH is overriden on command line, it must be an absolute path with no embedded shell special characters)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ("$(IDF_PATH)","$(subst :,,$(IDF_PATH))")
|
||||||
|
$(error IDF_PATH cannot contain colons. If overriding IDF_PATH on Windows, use Cygwin-style /c/dir instead of C:/dir)
|
||||||
|
endif
|
||||||
|
|
||||||
# disable built-in make rules, makes debugging saner
|
# disable built-in make rules, makes debugging saner
|
||||||
MAKEFLAGS_OLD := $(MAKEFLAGS)
|
MAKEFLAGS_OLD := $(MAKEFLAGS)
|
||||||
MAKEFLAGS +=-rR
|
MAKEFLAGS +=-rR
|
||||||
|
Reference in New Issue
Block a user