diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-01-28 13:23:53 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-01-28 13:23:53 +0100 |
commit | 2421fd6aa65490ad2b5c46dc4bb387384520903b (patch) | |
tree | ba29ce591facb483d58cde3d351da589f8ea36f7 /mk | |
parent | 373e20a7f97442cbaa8601dcadc05c603ac77f96 (diff) | |
download | embtoolkit-2421fd6aa65490ad2b5c46dc4bb387384520903b.tar.gz embtoolkit-2421fd6aa65490ad2b5c46dc4bb387384520903b.tar.bz2 embtoolkit-2421fd6aa65490ad2b5c46dc4bb387384520903b.tar.xz |
Toolchain: do not decompress cached toolchain, if already done
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk')
-rw-r--r-- | mk/buildsystem.mk | 2 | ||||
-rw-r--r-- | mk/toolchain.mk | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/mk/buildsystem.mk b/mk/buildsystem.mk index 39341ec..9c7d96e 100644 --- a/mk/buildsystem.mk +++ b/mk/buildsystem.mk @@ -65,7 +65,7 @@ randconfig: basic basic: $(Q)$(MAKE) -f scripts/Makefile.build obj=scripts/basic -clean: rmallpath +clean: toolchain_clean rmallpath $(Q)$(MAKE) -f scripts/Makefile.clean obj=scripts/kconfig $(Q)$(MAKE) -f scripts/Makefile.clean obj=scripts/basic $(Q)rm -rf .config kbuild.log .fakeroot* diff --git a/mk/toolchain.mk b/mk/toolchain.mk index b9f8543..2d7999e 100644 --- a/mk/toolchain.mk +++ b/mk/toolchain.mk @@ -142,8 +142,10 @@ define ___embtk_toolchain_decompress endef define __embtk_toolchain_decompress - $(call embtk_pinfo,"Decompressing $(GNU_TARGET)/$(EMBTK_MCU_FLAG) toolchain - please wait...") - $(___embtk_toolchain_decompress) + $(if $(call __embtk_mk_pathnotexist,$(TOOLCHAIN_DIR)/.decompressed), + $(call embtk_pinfo,"Decompressing $(GNU_TARGET)/$(EMBTK_MCU_FLAG) toolchain - please wait...") + $(___embtk_toolchain_decompress) + touch $(TOOLCHAIN_DIR)/.decompressed) endef __embtk_toolchain_addons-y = $(patsubst %_install,%,$(TOOLCHAIN_ADDONS-y)) @@ -187,6 +189,13 @@ __embtk_toolchain_buildargs += $(__embtk_toolchain_addons_inst) buildtoolchain: $(Q)$(call __embtk_toolchain_build,$(__embtk_toolchain_buildargs)) +define __embtk_toolchain_clean + rm -rf $(TOOLCHAIN_DIR)/.decompressed +endef + +toolchain_clean: + $(Q)$(__embtk_toolchain_clean) + # Download target for offline build TOOLCHAIN_ALL_DEPS := $(TOOLCHAIN_PRE_DEPS) $(TOOLCHAIN_DEPS) TOOLCHAIN_ALL_DEPS += $(TOOLCHAIN_ADDONS_DEPS) |