kopia lustrzana https://github.com/espressif/esp-idf
build system: Explicitly disallow 'clean' along with non-cleaning targets
Too hard to stage the dependencies so that all clean steps complete before any build steps begin. Also, using and then deleting and then regenerating SDKCONFIG_MAKEFILE in one pass is really hard to manage successfully.pull/955/merge
rodzic
97efaab27b
commit
867b20837f
|
@ -45,10 +45,18 @@ help:
|
||||||
# dependency checks
|
# dependency checks
|
||||||
ifndef MAKE_RESTARTS
|
ifndef MAKE_RESTARTS
|
||||||
ifeq ("$(filter 4.% 3.81 3.82,$(MAKE_VERSION))","")
|
ifeq ("$(filter 4.% 3.81 3.82,$(MAKE_VERSION))","")
|
||||||
$(warning "esp-idf build system only supports GNU Make versions 3.81 or newer. You may see unexpected results with other Makes.")
|
$(warning esp-idf build system only supports GNU Make versions 3.81 or newer. You may see unexpected results with other Makes.)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# can't run 'clean' along with any non-clean targets
|
||||||
|
ifneq ("$(filter clean% %clean,$(MAKECMDGOALS))" ,"")
|
||||||
|
ifneq ("$(filter-out clean% %clean,$(MAKECMDGOALS))", "")
|
||||||
|
$(error esp-idf build system doesn't support running 'clean' targets along with any others. Run 'make clean' and then run other targets separately.)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# make IDF_PATH a "real" absolute path
|
# make IDF_PATH a "real" absolute path
|
||||||
# * works around the case where a shell character is embedded in the environment variable value.
|
# * 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
|
# * changes Windows-style C:/blah/ paths to MSYS/Cygwin style /c/blah
|
||||||
|
@ -404,10 +412,11 @@ size-files: $(APP_ELF)
|
||||||
size-components: $(APP_ELF)
|
size-components: $(APP_ELF)
|
||||||
$(PYTHON) $(IDF_PATH)/tools/idf_size.py --archives $(APP_MAP)
|
$(PYTHON) $(IDF_PATH)/tools/idf_size.py --archives $(APP_MAP)
|
||||||
|
|
||||||
# NB: this ordering is deliberate (app-clean before config-clean),
|
# NB: this ordering is deliberate (app-clean & bootloader-clean before
|
||||||
# so config remains valid during all component clean targets
|
# _config-clean), so config remains valid during all component clean
|
||||||
config-clean: app-clean $(call prereq_if_explicit,bootloader-clean)
|
# targets
|
||||||
clean: config-clean
|
config-clean: app-clean bootloader-clean
|
||||||
|
clean: app-clean bootloader-clean config-clean
|
||||||
|
|
||||||
# phony target to check if any git submodule listed in COMPONENT_SUBMODULES are missing
|
# phony target to check if any git submodule listed in COMPONENT_SUBMODULES are missing
|
||||||
# or out of date, and exit if so. Components can add paths to this variable.
|
# or out of date, and exit if so. Components can add paths to this variable.
|
||||||
|
|
|
@ -116,9 +116,10 @@ build_example () {
|
||||||
# build non-verbose first
|
# build non-verbose first
|
||||||
local BUILDLOG=${PWD}/examplebuild.${ID}.log
|
local BUILDLOG=${PWD}/examplebuild.${ID}.log
|
||||||
(
|
(
|
||||||
make MAKEFLAGS= clean defconfig &> >(tee -a "${BUILDLOG}") &&
|
make MAKEFLAGS= clean &&
|
||||||
make all &> >(tee -a "${BUILDLOG}")
|
make MAKEFLAGS= defconfig &&
|
||||||
) || {
|
make all
|
||||||
|
) &> >(tee -a "${BUILDLOG}") || {
|
||||||
RESULT=$?; FAILED_EXAMPLES+=" ${EXAMPLE_NAME}"
|
RESULT=$?; FAILED_EXAMPLES+=" ${EXAMPLE_NAME}"
|
||||||
make MAKEFLAGS= V=1 clean defconfig && make V=1 # verbose output for errors
|
make MAKEFLAGS= V=1 clean defconfig && make V=1 # verbose output for errors
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue