소스 검색

toolchain: force a full rebuild on buildbot if the toolchain changed

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau 8 년 전
부모
커밋
bd3a5ca190
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      toolchain/Makefile

+ 12 - 0
toolchain/Makefile

@@ -69,6 +69,18 @@ ifneq ($(ARCH),)
 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 $@
+
+$(STAGING_DIR)/.prepared: $(STAGING_DIR)/.toolchain_ver_check
+$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed: $(STAGING_DIR)/.prepared
+endif
+
 # prerequisites for the individual targets
 $(curdir)/ := .config prereq
 $(curdir)//compile = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk $(tools/stamp-compile)