diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2015-01-03 19:57:42 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2015-01-03 19:58:59 +0100 |
commit | 4d89a7a723de9439cf8d1e862f792c1943491412 (patch) | |
tree | 43980c2a525a35c8d52a9545ac6a0e765aaa7b60 | |
parent | 55bba4862fee60c67731db373920838f449e4365 (diff) | |
download | embtoolkit-4d89a7a723de9439cf8d1e862f792c1943491412.tar.gz embtoolkit-4d89a7a723de9439cf8d1e862f792c1943491412.tar.bz2 embtoolkit-4d89a7a723de9439cf8d1e862f792c1943491412.tar.xz |
Build system: rebuild packages if its configure options changed
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
-rw-r--r-- | core/mk/macros.mk | 6 | ||||
-rw-r--r-- | core/mk/pkg-macros/install.mk | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/core/mk/macros.mk b/core/mk/macros.mk index ebb82d6..426d9be 100644 --- a/core/mk/macros.mk +++ b/core/mk/macros.mk @@ -85,6 +85,12 @@ __embtk_mk_pathnotexist = $(shell test -e $(1) || echo y) __embtk_mk_uquote = $(subst ",,$(strip $(1))) embtk_uquote = $(call __embtk_mk_uquote,$(1)) +# +# embtk_shell_quote +# A macro to quote a string for use in shell variable. +# +embtk_shell_quote = $(subst ','\'',$(1)) + # Macro to print messages embtk_pwarning = $(call embtk_echo_yellow,"$(__embtk_msg_h)\\n~~ EmbToolkit ~~ WARNING: $(call __embtk_mk_uquote,$(1))\\n$(__embtk_msg_h)") embtk_perror = $(call embtk_echo_red,"$(__embtk_msg_h)\\n~~ EmbToolkit ~~ ERROR: $(call __embtk_mk_uquote,$(1))\\n$(__embtk_msg_h)") diff --git a/core/mk/pkg-macros/install.mk b/core/mk/pkg-macros/install.mk index dce57e4..15b41f4 100644 --- a/core/mk/pkg-macros/install.mk +++ b/core/mk/pkg-macros/install.mk @@ -115,16 +115,22 @@ __embtk_pkg_notconfigured-y = $(call __embtk_mk_pathnotexist,$(__embtk_pkg_dotco # A macro to generate a package __embtk_pkg_dotkconfig_f file. # define __embtk_pkg_gen_dotkconfig_f - echo '__embtk_$(pkgv)_okconfigs := $(__embtk_pkg_kconfigs_all_v)' > $(__embtk_pkg_dotkconfig_f) + printf '__embtk_$(pkgv)_okconfigs := %s\n' \ + '$(call embtk_shell_quote,$(__embtk_pkg_kconfigs_all_v))' \ + > $(__embtk_pkg_dotkconfig_f) + printf '__embtk_$(pkgv)_oconfigureopts := %s\n' \ + '$(call embtk_shell_quote,$(__embtk_pkg_configureopts))' \ + >> $(__embtk_pkg_dotkconfig_f) endef # # A macro to test if a package build recipe needs to be run or not. # -__embtk_pkg_runrecipe-y = $(or $(__embtk_pkg_ninstalled-y),$(__embtk_pkg_confchanged-y)) +__embtk_pkg_runrecipe-y = $(or $(__embtk_pkg_ninstalled-y),$(__embtk_pkg_confchanged-y),$(__embtk_pkg_configurechanged-y)) __embtk_pkg_installed-y = $(or $(__embtk_$(pkgv)_installed),$(wildcard $(__embtk_pkg_dotinstalled_f))) __embtk_pkg_ninstalled-y = $(if $(__embtk_pkg_installed-y),,y) __embtk_pkg_confchanged-y = $(call __embtk_strneq,$(__embtk_pkg_kconfigs_all_v),$(__embtk_$(pkgv)_okconfigs)) +__embtk_pkg_configurechanged-y = $(call __embtk_strneq,$(__embtk_pkg_configureopts),$(__embtk_$(pkgv)_oconfigureopts)) # # Various helpers macros for different steps while installing packages. |