mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
parent
6a890e6c49
commit
305bc9fd9c
@ -16,8 +16,8 @@ BOOTLOADER_BIN=$(BOOTLOADER_BUILD_DIR)/bootloader.bin
|
|||||||
BOOTLOADER_SDKCONFIG=$(BOOTLOADER_BUILD_DIR)/sdkconfig
|
BOOTLOADER_SDKCONFIG=$(BOOTLOADER_BUILD_DIR)/sdkconfig
|
||||||
|
|
||||||
# Custom recursive make for bootloader sub-project
|
# Custom recursive make for bootloader sub-project
|
||||||
BOOTLOADER_MAKE=$(MAKE) -C $(BOOTLOADER_COMPONENT_PATH)/src \
|
BOOTLOADER_MAKE=+$(MAKE) -C $(BOOTLOADER_COMPONENT_PATH)/src \
|
||||||
MAKEFLAGS= V=$(V) SDKCONFIG=$(BOOTLOADER_SDKCONFIG) \
|
V=$(V) SDKCONFIG=$(BOOTLOADER_SDKCONFIG) \
|
||||||
BUILD_DIR_BASE=$(BOOTLOADER_BUILD_DIR) \
|
BUILD_DIR_BASE=$(BOOTLOADER_BUILD_DIR) \
|
||||||
|
|
||||||
.PHONY: bootloader-clean bootloader-flash bootloader $(BOOTLOADER_BIN)
|
.PHONY: bootloader-clean bootloader-flash bootloader $(BOOTLOADER_BIN)
|
||||||
|
@ -37,6 +37,7 @@ help:
|
|||||||
@echo "'make partition_table', etc, etc."
|
@echo "'make partition_table', etc, etc."
|
||||||
|
|
||||||
# disable built-in make rules, makes debugging saner
|
# disable built-in make rules, makes debugging saner
|
||||||
|
MAKEFLAGS_OLD := $(MAKEFLAGS)
|
||||||
MAKEFLAGS +=-rR
|
MAKEFLAGS +=-rR
|
||||||
|
|
||||||
# Figure out PROJECT_PATH if not set
|
# Figure out PROJECT_PATH if not set
|
||||||
@ -231,7 +232,7 @@ define GenerateComponentPhonyTarget
|
|||||||
# $(2) - target to generate (build, clean)
|
# $(2) - target to generate (build, clean)
|
||||||
.PHONY: $(notdir $(1))-$(2)
|
.PHONY: $(notdir $(1))-$(2)
|
||||||
$(notdir $(1))-$(2): | $(BUILD_DIR_BASE)/$(notdir $(1))
|
$(notdir $(1))-$(2): | $(BUILD_DIR_BASE)/$(notdir $(1))
|
||||||
@+$(MAKE) -C $(BUILD_DIR_BASE)/$(notdir $(1)) -f $(1)/component.mk COMPONENT_BUILD_DIR=$(BUILD_DIR_BASE)/$(notdir $(1)) $(2)
|
$(Q) +$(MAKE) -C $(BUILD_DIR_BASE)/$(notdir $(1)) -f $(1)/component.mk COMPONENT_BUILD_DIR=$(BUILD_DIR_BASE)/$(notdir $(1)) $(2)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define GenerateComponentTargets
|
define GenerateComponentTargets
|
||||||
|
@ -11,10 +11,9 @@ KCONFIG_TOOL_DIR=$(IDF_PATH)/tools/kconfig
|
|||||||
# unless it's overriden (happens for bootloader)
|
# unless it's overriden (happens for bootloader)
|
||||||
SDKCONFIG ?= $(PROJECT_PATH)/sdkconfig
|
SDKCONFIG ?= $(PROJECT_PATH)/sdkconfig
|
||||||
|
|
||||||
# clear MAKEFLAGS as the menuconfig makefile uses implicit compile rules
|
# reset MAKEFLAGS as the menuconfig makefile uses implicit compile rules
|
||||||
$(KCONFIG_TOOL_DIR)/mconf $(KCONFIG_TOOL_DIR)/conf:
|
$(KCONFIG_TOOL_DIR)/mconf $(KCONFIG_TOOL_DIR)/conf:
|
||||||
MAKEFLAGS="" \
|
MAKEFLAGS=$(ORIGINAL_MAKEFLAGS) CC=$(HOSTCC) LD=$(HOSTLD) \
|
||||||
CC=$(HOSTCC) LD=$(HOSTLD) \
|
|
||||||
$(MAKE) -C $(KCONFIG_TOOL_DIR)
|
$(MAKE) -C $(KCONFIG_TOOL_DIR)
|
||||||
|
|
||||||
# use a wrapper environment for where we run Kconfig tools
|
# use a wrapper environment for where we run Kconfig tools
|
||||||
|
@ -92,7 +92,7 @@ function run_tests()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
print_status "Moving BUILD_DIR_BASE out of tree"
|
print_status "Moving BUILD_DIR_BASE out of tree"
|
||||||
rm -rf --preserve-root ${BUILD}/*
|
clean_build_dir
|
||||||
OUTOFTREE_BUILD=${TESTDIR}/alt_build
|
OUTOFTREE_BUILD=${TESTDIR}/alt_build
|
||||||
make BUILD_DIR_BASE=${OUTOFTREE_BUILD} || failure "Failed to build with BUILD_DIR_BASE overriden"
|
make BUILD_DIR_BASE=${OUTOFTREE_BUILD} || failure "Failed to build with BUILD_DIR_BASE overriden"
|
||||||
NEW_BUILD_FILES=$(find ${OUTOFREE_BUILD} -type f)
|
NEW_BUILD_FILES=$(find ${OUTOFREE_BUILD} -type f)
|
||||||
@ -105,13 +105,20 @@ function run_tests()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
print_status "BUILD_DIR_BASE inside default build directory"
|
print_status "BUILD_DIR_BASE inside default build directory"
|
||||||
rm -rf --preserve-root ${BUILD}/*
|
clean_build_dir
|
||||||
make BUILD_DIR_BASE=build/subdirectory || failure "Failed to build with BUILD_DIR_BASE as subdir"
|
make BUILD_DIR_BASE=build/subdirectory || failure "Failed to build with BUILD_DIR_BASE as subdir"
|
||||||
NEW_BUILD_FILES=$(find ${BUILD}/subdirectory -type f)
|
NEW_BUILD_FILES=$(find ${BUILD}/subdirectory -type f)
|
||||||
if [ -z "${NEW_BUILD_FILES}" ]; then
|
if [ -z "${NEW_BUILD_FILES}" ]; then
|
||||||
failure "No files found in new build directory!"
|
failure "No files found in new build directory!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
print_status "Parallel builds should work OK"
|
||||||
|
clean_build_dir
|
||||||
|
(make -j5 2>&1 | tee ${TESTDIR}/parallel_build.log) || failure "Failed to build in parallel"
|
||||||
|
if grep -q "warning: jobserver unavailable" ${TESTDIR}/parallel_build.log; then
|
||||||
|
failure "Parallel build prints 'warning: jobserver unavailable' errors"
|
||||||
|
fi
|
||||||
|
|
||||||
print_status "Can still clean build if all text files are CRLFs"
|
print_status "Can still clean build if all text files are CRLFs"
|
||||||
make clean || failure "Unexpected failure to make clean"
|
make clean || failure "Unexpected failure to make clean"
|
||||||
find . -exec unix2dos {} \; # CRLFify template dir
|
find . -exec unix2dos {} \; # CRLFify template dir
|
||||||
@ -222,5 +229,11 @@ function assert_not_rebuilt()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# do a "clean" that doesn't depend on 'make clean'
|
||||||
|
function clean_build_dir()
|
||||||
|
{
|
||||||
|
rm -rf --preserve-root ${BUILD}/*
|
||||||
|
}
|
||||||
|
|
||||||
cd ${TESTDIR}
|
cd ${TESTDIR}
|
||||||
run_tests
|
run_tests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user