summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-02-16 07:43:27 +0100
committerFelix Fietkau <nbd@nbd.name>2017-02-16 08:13:16 +0100
commitf44ae19e1566410b75de5039071a42a0f3ade949 (patch)
tree153987aa527550a17545dbcd0137bb7c1fe677b1
parenta11243578ad159cb75c175bf9c2236f3a0af85ea (diff)
downloadmtk-20170518-f44ae19e1566410b75de5039071a42a0f3ade949.zip
mtk-20170518-f44ae19e1566410b75de5039071a42a0f3ade949.tar.gz
mtk-20170518-f44ae19e1566410b75de5039071a42a0f3ade949.tar.bz2
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>
-rw-r--r--toolchain/Makefile16
1 files changed, 8 insertions, 8 deletions
diff --git a/toolchain/Makefile b/toolchain/Makefile
index 34abda2..7a9730f 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -70,15 +70,15 @@ endif
endif
ifdef CONFIG_BUILDBOT
- $(STAGING_DIR)/.toolchain_ver_check: $(TMP_DIR)/.build
- cd "$(TOPDIR)"; git log --format=%h -1 > $(TMP_DIR)/.toolchain_ver_check
- cmp -s $(TMP_DIR)/.toolchain_ver_check $@ || \
- rm -rf $(BUILD_DIR) $(STAGING_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR_TOOLCHAIN)
- mkdir -p $(STAGING_DIR)
- mv $(TMP_DIR)/.toolchain_ver_check $@
+ $(TOOLCHAIN_DIR)/stamp/.ver_check: $(TMP_DIR)/.build
+ cd "$(TOPDIR)"; git log --format=%h -1 toolchain > $(TMP_DIR)/.ver_check
+ cmp -s $(TMP_DIR)/.ver_check $@ || { \
+ rm -rf $(BUILD_DIR) $(STAGING_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR_TOOLCHAIN); \
+ mkdir -p $(TOOLCHAIN_DIR)/stamp; \
+ mv $(TMP_DIR)/.ver_check $@; \
+ }
-$(STAGING_DIR)/.prepared: $(STAGING_DIR)/.toolchain_ver_check
-$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed: $(STAGING_DIR)/.prepared
+$(TOOLCHAIN_DIR)/info.mk $(STAGING_DIR)/.prepared: $(TOOLCHAIN_DIR)/stamp/.ver_check
endif
# prerequisites for the individual targets