ifeq ("$(IS_BOOTLOADER_BUILD)","")
BOOTLOADER_COMPONENT_PATH := $(COMPONENT_PATH)
-BOOTLOADER_BUILD_DIR=$(BUILD_DIR_BASE)/bootloader
+BOOTLOADER_BUILD_DIR=$(abspath $(BUILD_DIR_BASE)/bootloader)
BOOTLOADER_BIN=$(BOOTLOADER_BUILD_DIR)/bootloader.bin
BOOTLOADER_SDKCONFIG=$(BOOTLOADER_BUILD_DIR)/sdkconfig
# lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable,
# please read the esp-idf build system document if you need to do this.
#
--include $(BUILD_DIR_BASE)/include/config/auto.conf
+-include include/config/auto.conf
COMPONENT_SRCDIRS := . hwcrypto
$(call GetVariable,$(comp),COMPONENT_ADD_INCLUDEDIRS))))
#Also add project include path, for sdk includes
-COMPONENT_INCLUDES += $(BUILD_DIR_BASE)/include/
+COMPONENT_INCLUDES += $(abspath $(BUILD_DIR_BASE)/include/)
export COMPONENT_INCLUDES
#COMPONENT_LDFLAGS has a list of all flags that are needed to link the components together. It's collected
$(MAKE) -C $(KCONFIG_TOOL_DIR)
# use a wrapper environment for where we run Kconfig tools
-KCONFIG_TOOL_ENV=KCONFIG_AUTOHEADER=$(BUILD_DIR_BASE)/include/sdkconfig.h \
+KCONFIG_TOOL_ENV=KCONFIG_AUTOHEADER=$(abspath $(BUILD_DIR_BASE)/include/sdkconfig.h) \
COMPONENT_KCONFIGS="$(COMPONENT_KCONFIGS)" KCONFIG_CONFIG=$(SDKCONFIG) \
COMPONENT_KCONFIGS_PROJBUILD="$(COMPONENT_KCONFIGS_PROJBUILD)"
failure "Files weren't cleaned: ${ALL_BUILD_FILES}"
fi
- print_status "Moving BUILD_DIR_BASE out of tree should still build OK"
+ print_status "Moving BUILD_DIR_BASE out of tree"
rm -rf --preserve-root ${BUILD}/*
OUTOFTREE_BUILD=${TESTDIR}/alt_build
make BUILD_DIR_BASE=${OUTOFTREE_BUILD} || failure "Failed to build with BUILD_DIR_BASE overriden"
failure "Some files were incorrectly put into the default build directory: ${DEFAULT_BUILD_FILES}"
fi
+ print_status "BUILD_DIR_BASE inside default build directory"
+ rm -rf --preserve-root ${BUILD}/*
+ make BUILD_DIR_BASE=build/subdirectory || failure "Failed to build with BUILD_DIR_BASE as subdir"
+ NEW_BUILD_FILES=$(find ${BUILD}/subdirectory -type f)
+ if [ -z "${NEW_BUILD_FILES}" ]; then
+ failure "No files found in new build directory!"
+ fi
+
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