aboutsummaryrefslogtreecommitdiff
path: root/package/pkg-utils.mk
diff options
context:
space:
mode:
authorGravatar Thomas De Schampheleire <patrickdepinguin@gmail.com>2014-07-14 13:50:26 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-07-15 19:18:40 +0200
commit62bbfbaa63f47a9057d87e434744e50c08c8ff32 (patch)
tree58402d0ed596c52ea082b31bd9b62c6f4a62d78f /package/pkg-utils.mk
parent358bf954452c095e5f782187ad7579e42d903df3 (diff)
downloadbuildroot-62bbfbaa63f47a9057d87e434744e50c08c8ff32.tar.gz
buildroot-62bbfbaa63f47a9057d87e434744e50c08c8ff32.tar.bz2
pkg-utils: kconfig helpers: use single iso double quoting
The echo statements in the kconfig helpers are currently using double quotes. For KCONFIG_SET_OPT this is problematic when the value argument itself contains a double quote (a string value). In this case, the statement echo "$(1)=$(2)" >> $(3) would become: echo "FOO="string value"" >> /some/path/.config resulting in the string FOO=string value in the config file, rather than the properly quoted FOO="string value" The linux package worked around this by escaping the quote characters, but a prettier solution is to use single quoting in the helpers (or alternatively use no quoting at all). A side effect of this change is that a $variable in the key or value would no longer be interpreted by the shell, removing any unexpected behavior. This change is only really necessary for KCONFIG_SET_OPT, but for symmetry reasons the other helpers are updated too. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/pkg-utils.mk')
-rw-r--r--package/pkg-utils.mk6
1 files changed, 3 insertions, 3 deletions
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index e802864445..99e1f7644f 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -35,17 +35,17 @@ $(eval $(call caseconvert-helper,LOWERCASE,$(join $(addsuffix :,$([TO])),$([FROM
define KCONFIG_ENABLE_OPT # (option, file)
$(SED) "/\\<$(1)\\>/d" $(2)
- echo "$(1)=y" >> $(2)
+ echo '$(1)=y' >> $(2)
endef
define KCONFIG_SET_OPT # (option, value, file)
$(SED) "/\\<$(1)\\>/d" $(3)
- echo "$(1)=$(2)" >> $(3)
+ echo '$(1)=$(2)' >> $(3)
endef
define KCONFIG_DISABLE_OPT # (option, file)
$(SED) "/\\<$(1)\\>/d" $(2)
- echo "# $(1) is not set" >> $(2)
+ echo '# $(1) is not set' >> $(2)
endef
# Helper functions to determine the name of a package and its