diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2013-04-01 19:40:33 +0200 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2013-04-01 19:40:33 +0200 |
commit | ddec8b29cce2c43267225afb50bbb683b8106e66 (patch) | |
tree | e1805cd57796bc4d5453218d4181a11314f2ce68 /lib | |
parent | 576a7c1f931a1f3e1c8ecad1c24cd643dc112cf0 (diff) |
allow backported drivers to select backport options
This allows to have, for example, CRC8 still selected
by drivers (modified to BACKPORT_CRC8) and then build
the CRC8 code only conditionally on not having it in
the base kernel and being required by a driver.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kconfig.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/kconfig.py b/lib/kconfig.py index f2dc894d..c2c55860 100644 --- a/lib/kconfig.py +++ b/lib/kconfig.py @@ -70,7 +70,10 @@ class ConfigTree(object): for l in open(os.path.join(self.basedir, nf), 'r'): m = sel_line.match(l) if m and not m.group('sym') in syms: - out += m.group('spc') + "depends on " + m.group('sym') + '\n' + if 'BACKPORT_' + m.group('sym') in syms: + out += m.group('spc') + "select BACKPORT_" + m.group('sym') + '\n' + else: + out += m.group('spc') + "depends on " + m.group('sym') + '\n' else: out += l outf = open(os.path.join(self.basedir, nf), 'w') |