X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=Makefile;h=39ab3ae4a52e5626dd45a3cd53903cebab05e34f;hb=b7d9bced3056d37857292670ed1a29084ecb0aa1;hp=aecee6929e29add4a161f70f5bfd80f7e02b8568;hpb=1b6209203d4e403b4c6b124d1222d0a4ad69d37f;p=openwrt%2Fstaging%2Fchunkeey.git diff --git a/Makefile b/Makefile index aecee6929e..39ab3ae4a5 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir world: -DISTRO_PKG_CONFIG:=$(shell command -pv pkg-config | grep -E '\/usr' | head -n 1) +DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '\/usr' | head -n 1) export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH) ifneq ($(OPENWRT_BUILD),1) @@ -38,7 +38,7 @@ else include tools/Makefile include toolchain/Makefile -$(toolchain/stamp-compile): $(tools/stamp-compile) +$(toolchain/stamp-compile): $(tools/stamp-compile) $(if $(CONFIG_BUILDBOT),toolchain_rebuild_check) $(target/stamp-compile): $(toolchain/stamp-compile) $(tools/stamp-compile) $(BUILD_DIR)/.prepared $(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup) $(package/stamp-install): $(package/stamp-compile) @@ -50,14 +50,23 @@ printdb: prepare: $(target/stamp-compile) -clean: FORCE +_clean: FORCE rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(BUILD_LOG_DIR) $(TOPDIR)/staging_dir/packages -dirclean: clean - rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/host $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN) +clean: _clean + rm -rf $(BUILD_LOG_DIR) + +targetclean: _clean + rm -rf $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN) + +dirclean: targetclean clean + rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(BUILD_DIR_BASE)/host rm -rf $(TMP_DIR) $(MAKE) -C $(TOPDIR)/scripts/config clean +toolchain_rebuild_check: + $(SCRIPT_DIR)/check-toolchain-clean.sh + cacheclean: ifneq ($(CONFIG_CCACHE),) $(STAGING_DIR_HOST)/bin/ccache -C