aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kbuild/kconfig-language.txt1
-rw-r--r--scripts/kconfig/menu.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt
index c858f8419eba..c420676c6fe3 100644
--- a/Documentation/kbuild/kconfig-language.txt
+++ b/Documentation/kbuild/kconfig-language.txt
@@ -147,6 +147,7 @@ applicable everywhere (see syntax).
147 - "modules" 147 - "modules"
148 This declares the symbol to be used as the MODULES symbol, which 148 This declares the symbol to be used as the MODULES symbol, which
149 enables the third modular state for all config symbols. 149 enables the third modular state for all config symbols.
150 At most one symbol may have the "modules" option set.
150 151
151 - "env"=<value> 152 - "env"=<value>
152 This imports the environment variable into Kconfig. It behaves like 153 This imports the environment variable into Kconfig. It behaves like
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 3a9c67493260..c1d53200c306 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -199,6 +199,12 @@ void menu_add_option(int token, char *arg)
199{ 199{
200 switch (token) { 200 switch (token) {
201 case T_OPT_MODULES: 201 case T_OPT_MODULES:
202 if (modules_sym)
203 zconf_error("symbol '%s' redefines option 'modules'"
204 " already defined by symbol '%s'",
205 current_entry->sym->name,
206 modules_sym->name
207 );
202 modules_sym = current_entry->sym; 208 modules_sym = current_entry->sym;
203 break; 209 break;
204 case T_OPT_DEFCONFIG_LIST: 210 case T_OPT_DEFCONFIG_LIST: