From 85ce07e6fd1de6614d0abf34a71a473dd8bdabde Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 20 Sep 2017 17:38:54 +1000 Subject: [PATCH 1/2] build system: Fix bad partial builds after updates, sdkconfig changes Fixes accidental regression merging 9903ea1c1102. Add test case for this kind of rebuilding. --- make/component_wrapper.mk | 6 +++++- tools/ci/test_build_system.sh | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/make/component_wrapper.mk b/make/component_wrapper.mk index 751668d4b0..d05777e300 100644 --- a/make/component_wrapper.mk +++ b/make/component_wrapper.mk @@ -147,7 +147,11 @@ endef # component-specific feature, please don't! What you want is a # Makefile.projbuild for your component (see docs/build-system.rst for # more.) -component_project_vars.mk: +# +# Note: The :: target here is not a mistake. This target should always be +# executed, as dependencies are checked by the parent project-level make target. +# See https://www.gnu.org/software/make/manual/make.html#index-_003a_003a-rules-_0028double_002dcolon_0029 +component_project_vars.mk:: $(details) "Building component project variables list $(abspath $@)" @echo '# Automatically generated build file. Do not edit.' > $@ @echo 'COMPONENT_INCLUDES += $(call MakeVariablePath,$(addprefix $(COMPONENT_PATH)/,$(COMPONENT_ADD_INCLUDEDIRS)))' >> $@ diff --git a/tools/ci/test_build_system.sh b/tools/ci/test_build_system.sh index e7a3c73160..36bf2268d9 100755 --- a/tools/ci/test_build_system.sh +++ b/tools/ci/test_build_system.sh @@ -165,6 +165,8 @@ function run_tests() take_build_snapshot touch sdkconfig make + # check the component_project_vars.mk file was rebuilt + assert_rebuilt esp32/component_project_vars.mk # pick one each of .c, .cpp, .S that #includes sdkconfig.h # and therefore should rebuild assert_rebuilt newlib/syscall_table.o From 53d12a6212416897ca02caac76d5d787406f3bd7 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 20 Sep 2017 18:21:29 +1000 Subject: [PATCH 2/2] build system tests: Don't unix2dos .git files, build directories --- tools/ci/test_build_system.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ci/test_build_system.sh b/tools/ci/test_build_system.sh index 36bf2268d9..d2e75ddf91 100755 --- a/tools/ci/test_build_system.sh +++ b/tools/ci/test_build_system.sh @@ -134,13 +134,13 @@ function run_tests() print_status "Can still clean build if all text files are CRLFs" make clean || failure "Unexpected failure to make clean" - find . -exec unix2dos {} \; # CRLFify template dir + find . -path .git -prune -exec unix2dos {} \; # CRLFify template dir # make a copy of esp-idf and CRLFify it CRLF_ESPIDF=${TESTDIR}/esp-idf-crlf mkdir -p ${CRLF_ESPIDF} cp -r ${IDF_PATH}/* ${CRLF_ESPIDF} # don't CRLFify executable files, as Linux will fail to execute them - find ${CRLF_ESPIDF} -type f ! -perm 755 -exec unix2dos {} \; + find ${CRLF_ESPIDF} -name .git -prune -name build -prune -type f ! -perm 755 -exec unix2dos {} \; make IDF_PATH=${CRLF_ESPIDF} || failure "Failed to build with CRLFs in source" # do the same checks we do for the clean build assert_built ${APP_BINS} ${BOOTLOADER_BINS} partitions_singleapp.bin