|
@@ -22,12 +22,17 @@ KCONFIG_DOT_CONFIG = $(strip \
|
|
|
|
|
|
# KCONFIG_MUNGE_DOT_CONFIG (option, newline [, file])
|
|
# KCONFIG_MUNGE_DOT_CONFIG (option, newline [, file])
|
|
define KCONFIG_MUNGE_DOT_CONFIG
|
|
define KCONFIG_MUNGE_DOT_CONFIG
|
|
- $(SED) "/\\<$(strip $(1))\\>/d" $(call KCONFIG_DOT_CONFIG,$(3))
|
|
|
|
|
|
+ $(SED) "/\\<$(strip $(1))\\>/d" $(call KCONFIG_DOT_CONFIG,$(3)) && \
|
|
echo '$(strip $(2))' >> $(call KCONFIG_DOT_CONFIG,$(3))
|
|
echo '$(strip $(2))' >> $(call KCONFIG_DOT_CONFIG,$(3))
|
|
endef
|
|
endef
|
|
|
|
|
|
# KCONFIG_ENABLE_OPT (option [, file])
|
|
# KCONFIG_ENABLE_OPT (option [, file])
|
|
-KCONFIG_ENABLE_OPT = $(call KCONFIG_MUNGE_DOT_CONFIG, $(1), $(1)=y, $(2))
|
|
|
|
|
|
+# If the option is already set to =m or =y, ignore.
|
|
|
|
+define KCONFIG_ENABLE_OPT
|
|
|
|
+ $(Q)if ! grep -q '^$(strip $(1))=[my]' $(call KCONFIG_DOT_CONFIG,$(2)); then \
|
|
|
|
+ $(call KCONFIG_MUNGE_DOT_CONFIG, $(1), $(1)=y, $(2)); \
|
|
|
|
+ fi
|
|
|
|
+endef
|
|
# KCONFIG_SET_OPT (option, value [, file])
|
|
# KCONFIG_SET_OPT (option, value [, file])
|
|
KCONFIG_SET_OPT = $(call KCONFIG_MUNGE_DOT_CONFIG, $(1), $(1)=$(2), $(3))
|
|
KCONFIG_SET_OPT = $(call KCONFIG_MUNGE_DOT_CONFIG, $(1), $(1)=$(2), $(3))
|
|
# KCONFIG_DISABLE_OPT (option [, file])
|
|
# KCONFIG_DISABLE_OPT (option [, file])
|