From ae9b8399908a4768fbc10f4b50f0fbb3cb6cca84 Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou GAYE Date: Sun, 17 Jul 2011 00:07:59 +0200 Subject: Build system: use another file than .installed to detect packages config changes Signed-off-by: Abdoulaye Walsimou GAYE --- mk/macros.mk | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/mk/macros.mk b/mk/macros.mk index 440b233..519c26a 100644 --- a/mk/macros.mk +++ b/mk/macros.mk @@ -244,21 +244,22 @@ __embtk_pkg_configured-y = $(shell test -e $($(PKGV)_BUILD_DIR)/.configured && e # A macro to test if a package is already installed. # It returns y if installed and nothing if not. # -__installed_f_old=$($(PKGV)_BUILD_DIR)/.installed.old __installed_f=$($(PKGV)_BUILD_DIR)/.installed +__pkgkconfig_f=$($(PKGV)_BUILD_DIR)/.embtk.$($(PKGV)_NAME).kconfig +__pkgkconfig_f_old=$($(PKGV)_BUILD_DIR)/.embtk.$($(PKGV)_NAME).kconfig.old __embtk_pkg_installed-y = $(shell \ - if [ -e $(__installed_f) ]; then \ - cp $(__installed_f) $(__installed_f_old); \ + if [ -e $(__installed_f) ] && [ -e $(__pkgkconfig_f) ]; then \ + cp $(__pkgkconfig_f) $(__pkgkconfig_f_old); \ grep 'CONFIG_EMBTK_.*$(PKGV)_.*' $(EMBTK_DOTCONFIG) \ - > $(__installed_f); \ - cmp -s $(__installed_f) $(__installed_f_old); \ + > $(__pkgkconfig_f); \ + cmp -s $(__pkgkconfig_f) $(__pkgkconfig_f_old); \ if [ "x$$?" = "x0" ]; then \ echo y; \ fi; \ else \ mkdir -p $($(PKGV)_BUILD_DIR); \ grep 'CONFIG_EMBTK_.*$(PKGV)_.*' $(EMBTK_DOTCONFIG) \ - > $(__installed_f); \ + > $(__pkgkconfig_f); \ fi;) # @@ -435,7 +436,7 @@ endef # $(call embtk_install_hostpkg,package) # define embtk_install_hostpkg - $(Q)$(if $(__embtk_pkg_installed-y),true, \ + $(Q)$(if $(__embtk_pkg_installed-y),true, \ $(call __embtk_install_hostpkg_make,$(1),autotools)) endef @@ -446,7 +447,7 @@ endef # $(call embtk_makeinstall_hostpkg,package) # define embtk_makeinstall_hostpkg - $(Q)$(if $(__embtk_pkg_installed-y),true, \ + $(Q)$(if $(__embtk_pkg_installed-y),true, \ $(call __embtk_install_hostpkg_make,$(1))) endef -- cgit v1.2.3