X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=toolchain%2FMakefile;h=0336b2f72cee18fefa66cce218c553b9b99a6e30;hp=6ee881155e8067a5cbbef976a7a34a6db5bdfd0e;hb=ca13820d134db3ee4c0c6c75ae9dde2aeb75a905;hpb=b2c66724d71aa252b2d21c9984e7866a025ffd86 diff --git a/toolchain/Makefile b/toolchain/Makefile index 6ee881155e..0336b2f72c 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -29,7 +29,7 @@ curdir:=toolchain # subdirectories to descend into -$(curdir)/builddirs := $(if $(CONFIG_GDB),gdb) $(if $(CONFIG_INSIGHT),insight) $(if $(CONFIG_EXTERNAL_TOOLCHAIN),wrapper,kernel-headers binutils gcc/initial gcc/final $(LIBC) fortify-headers) $(if $(CONFIG_YASM),yasm) +$(curdir)/builddirs := $(if $(CONFIG_GDB),gdb) $(if $(CONFIG_EXTERNAL_TOOLCHAIN),wrapper,kernel-headers binutils gcc/initial gcc/final $(LIBC) fortify-headers) $(if $(CONFIG_NASM),nasm) ifdef CONFIG_USE_UCLIBC $(curdir)/builddirs += $(LIBC)/utils endif @@ -69,6 +69,20 @@ ifneq ($(ARCH),) endif endif +ifdef CONFIG_BUILDBOT +ifneq ($(wildcard $(TOPDIR)/.git),) + $(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 $@; \ + } + +$(TOOLCHAIN_DIR)/info.mk $(STAGING_DIR)/.prepared: $(TOOLCHAIN_DIR)/stamp/.ver_check +endif +endif + # prerequisites for the individual targets $(curdir)/ := .config prereq $(curdir)//compile = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk $(tools/stamp-compile)