From 97928cab4442cfab746142d1247c133bac65c5f7 Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Sat, 21 Jan 2012 20:04:06 +0100 Subject: Build system: create FORCE and .PHONY targets to try to improve performance Signed-off-by: Abdoulaye Walsimou Gaye --- mk/buildsystem.mk | 3 +++ mk/packages.mk | 9 ++++++--- mk/toolchain.mk | 5 ++++- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'mk') diff --git a/mk/buildsystem.mk b/mk/buildsystem.mk index 77ef1ad..571d29d 100644 --- a/mk/buildsystem.mk +++ b/mk/buildsystem.mk @@ -170,3 +170,6 @@ rmallpath: $(Q)rm -rf $(SYSROOT)* $(HOSTTOOLS)* $(EMBTK_GENERATED)/rootfs-* $(Q)rm -rf $(EMBTK_GENERATED)/initramfs-* $(Q)$(if $(CONFIG_EMBTK_CACHE_PATCHES),,rm -rf $(DOWNLOAD_DIR)/*.patch) + +EMBTK_PHONIES += xconfig menuconfig randconfig basic clean distclean startbuild +EMBTK_PHONIES += mkinitialpath rmallpath diff --git a/mk/packages.mk b/mk/packages.mk index 2e27261..8e8b849 100644 --- a/mk/packages.mk +++ b/mk/packages.mk @@ -96,16 +96,19 @@ endif # # This install implicit rule is intended for autotool'ed packages -%_install: +%_install: FORCE $(call embtk_install_$(findstring host,$@)pkg,$*) # Download generic implicit rule -download_%: +download_%: FORCE $(call embtk_download_pkg,$*) # clean generic implicit rule -%_clean: +%_clean: FORCE $(call embtk_cleanup_pkg,$*) # Download target for offline build packages_fetch:: $(patsubst %_install,download_%,$(ROOTFS_COMPONENTS-y) $(HOSTTOOLS_COMPONENTS-y)) + +EMBTK_PHONIES += $(ROOTFS_COMPONENTS-y) $(HOSTTOOLS_COMPONENTS-y) +EMBTK_PHONIES += $(ROOTFS_COMPONENTS_CLEAN) diff --git a/mk/toolchain.mk b/mk/toolchain.mk index 14d35ef..dd85fe8 100644 --- a/mk/toolchain.mk +++ b/mk/toolchain.mk @@ -178,7 +178,7 @@ __embtk_toolchain_addons_inst = $(strip $(if $(call __embtk_pkg_installed-y,tool __embtk_toolchain_buildargs = $(__embtk_toolchain_core_inst) __embtk_toolchain_buildargs += $(__embtk_toolchain_addons_inst) -buildtoolchain: +buildtoolchain: FORCE $(Q)$(call __embtk_toolchain_build,$(__embtk_toolchain_buildargs)) # Download target for offline build @@ -186,3 +186,6 @@ TOOLCHAIN_ALL_DEPS := $(TOOLCHAIN_PRE_DEPS) $(TOOLCHAIN_DEPS) TOOLCHAIN_ALL_DEPS += $(TOOLCHAIN_ADDONS_DEPS) packages_fetch:: $(patsubst %_install,download_%,$(TOOLCHAIN_ALL_DEPS)) + +EMBTK_PHONIES += buildtoolchain $(TOOLCHAIN_PRE_DEPS) +EMBTK_PHONIES += $(TOOLCHAIN_ADDONS-y) $(TOOLCHAIN_ADDONS-) -- cgit v1.2.3