From ddf3fd0cfc38f2e27b92f378b0df70f4c84faef8 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Fri, 29 May 2015 16:00:54 +0200 Subject: Only warn for 'option modules' on non-MODULES symbols. --- kconfiglib.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'kconfiglib.py') 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): -- cgit v1.2.3