diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2011-07-14 15:35:11 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2011-07-14 15:35:11 +0200 |
commit | e55a149054ba39c3a44354e02d11f1c0c0345ae6 (patch) | |
tree | 47a8656be28fe67f350c82e9673cbac2ce671ce6 /mk/macros.mk | |
parent | c3e4c4f9d927e7ef54722be06a4ddb85a7c562a0 (diff) | |
download | embtoolkit-e55a149054ba39c3a44354e02d11f1c0c0345ae6.tar.gz embtoolkit-e55a149054ba39c3a44354e02d11f1c0c0345ae6.tar.bz2 embtoolkit-e55a149054ba39c3a44354e02d11f1c0c0345ae6.tar.xz |
Build system: implementation of Features#34: ability to rebuild packages when its configuration changes
Features #34: http://www.embtoolkit.org/issues/issues/34
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk/macros.mk')
-rw-r--r-- | mk/macros.mk | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mk/macros.mk b/mk/macros.mk index 4cf8b62..440b233 100644 --- a/mk/macros.mk +++ b/mk/macros.mk @@ -244,7 +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. # -__embtk_pkg_installed-y = $(shell test -e $($(PKGV)_BUILD_DIR)/.installed && echo y) +__installed_f_old=$($(PKGV)_BUILD_DIR)/.installed.old +__installed_f=$($(PKGV)_BUILD_DIR)/.installed +__embtk_pkg_installed-y = $(shell \ + if [ -e $(__installed_f) ]; then \ + cp $(__installed_f) $(__installed_f_old); \ + grep 'CONFIG_EMBTK_.*$(PKGV)_.*' $(EMBTK_DOTCONFIG) \ + > $(__installed_f); \ + cmp -s $(__installed_f) $(__installed_f_old); \ + if [ "x$$?" = "x0" ]; then \ + echo y; \ + fi; \ + else \ + mkdir -p $($(PKGV)_BUILD_DIR); \ + grep 'CONFIG_EMBTK_.*$(PKGV)_.*' $(EMBTK_DOTCONFIG) \ + > $(__installed_f); \ + fi;) # # A macro which runs configure script (conpatible with autotools configure) |