build: fix the toolchain rebuild check
- Check for changes in toolchain/ only - Only replace the stamp file if it was changed - Fix dependencies for staging dir prepare - Move the stamp file to TOOLCHAIN_DIR Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
a11243578a
commit
f44ae19e15
1 changed files with 8 additions and 8 deletions
|
@ -70,15 +70,15 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_BUILDBOT
|
ifdef CONFIG_BUILDBOT
|
||||||
$(STAGING_DIR)/.toolchain_ver_check: $(TMP_DIR)/.build
|
$(TOOLCHAIN_DIR)/stamp/.ver_check: $(TMP_DIR)/.build
|
||||||
cd "$(TOPDIR)"; git log --format=%h -1 > $(TMP_DIR)/.toolchain_ver_check
|
cd "$(TOPDIR)"; git log --format=%h -1 toolchain > $(TMP_DIR)/.ver_check
|
||||||
cmp -s $(TMP_DIR)/.toolchain_ver_check $@ || \
|
cmp -s $(TMP_DIR)/.ver_check $@ || { \
|
||||||
rm -rf $(BUILD_DIR) $(STAGING_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR_TOOLCHAIN)
|
rm -rf $(BUILD_DIR) $(STAGING_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR_TOOLCHAIN); \
|
||||||
mkdir -p $(STAGING_DIR)
|
mkdir -p $(TOOLCHAIN_DIR)/stamp; \
|
||||||
mv $(TMP_DIR)/.toolchain_ver_check $@
|
mv $(TMP_DIR)/.ver_check $@; \
|
||||||
|
}
|
||||||
|
|
||||||
$(STAGING_DIR)/.prepared: $(STAGING_DIR)/.toolchain_ver_check
|
$(TOOLCHAIN_DIR)/info.mk $(STAGING_DIR)/.prepared: $(TOOLCHAIN_DIR)/stamp/.ver_check
|
||||||
$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed: $(STAGING_DIR)/.prepared
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# prerequisites for the individual targets
|
# prerequisites for the individual targets
|
||||||
|
|
Loading…
Reference in a new issue