diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2015-05-29 16:00:54 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2015-05-29 16:00:54 +0200 |
| commit | ddf3fd0cfc38f2e27b92f378b0df70f4c84faef8 (patch) | |
| tree | 8a2bf2f292abff718306404ffdea8686a139cb6a /kconfiglib.py | |
| parent | 676e7afa92382caa7bd14f386dcd7963c6e2fb82 (diff) | |
Only warn for 'option modules' on non-MODULES symbols.
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 1da33e6..9637f48 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1326,14 +1326,21 @@ error, and you should e-mail kconfiglib@gmail.com. self.defconfig_sym = stmt elif tokens.check(T_MODULES): - self._warn("the 'modules' option is not supported. " - "Let me know if this is a problem for you; " - "it shouldn't be that hard to implement. " - "(Note that modules are still supported -- " - "Kconfiglib just assumes the symbol name " - "MODULES.)", - filename, - linenr) + # To reduce warning spam, only warn if 'option modules' is + # set on some symbol that isn't MODULES, which should be + # safe. I haven't run into any projects that make use + # modules besides the kernel yet, and there it's likely to + # keep being called "MODULES". + if stmt.name != "MODULES": + self._warn("the 'modules' option is not supported. " + "Let me know if this is a problem for you; " + "it shouldn't be that hard to implement. " + "(Note that modules are still supported -- " + "Kconfiglib just assumes the symbol name " + "MODULES, like older versions of the C " + "did when 'option modules' wasn't used.)", + filename, + linenr) elif tokens.check(T_ALLNOCONFIG_Y): if not isinstance(stmt, Symbol): |
