Commit 0383d48a authored by Malte Starostik's avatar Malte Starostik Committed by Peter Korsgaard
Browse files

Match whole words when changing .config options



Make KCONFIG_{ENABLE,DISABLE,SET}_OPT match whole words only.
Fixes that BR_INET_IPV6 enables CONFIG_IPV6 in the kernel's
.config, but also nukes everything with "CONFIG_IPV6" in its name, e.g.
CONFIG_IPV6_PRIVACY.  This in turn causes any IPv6 options in a custom
kernel .config to be lost and oldconfig going interactive.

Signed-off-by: default avatarMalte Starostik <m-starostik@versanet.de>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent ad36fcdd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -41,17 +41,17 @@ UPPERCASE = $(strip $(eval __tmp := $1) \
     $(__tmp))

define KCONFIG_ENABLE_OPT
       $(SED) "/$(1)/d" $(2)
       $(SED) "/\\<$(1)\\>/d" $(2)
       echo "$(1)=y" >> $(2)
endef

define KCONFIG_SET_OPT
       $(SED) "/$(1)/d" $(3)
       $(SED) "/\\<$(1)\\>/d" $(3)
       echo "$(1)=$(2)" >> $(3)
endef

define KCONFIG_DISABLE_OPT
       $(SED) "/$(1)/d" $(2)
       $(SED) "/\\<$(1)\\>/d" $(2)
       echo "# $(1) is not set" >> $(2)
endef