diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2013-04-03 11:46:00 +0200 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2013-04-03 11:46:00 +0200 |
commit | d76164f86e614d3115daa3564202d6bb62214b2a (patch) | |
tree | 834ffb7bfe01530162da9545cc3470cdcf37d73c /gentree.py | |
parent | 200dc80b4839fdcc47f432fddef1bf6381d18282 (diff) |
correct makefile/kconfig mangling
Due to reordering the steps, the makefile and kconfig
mangling needs to be changed a bit, make it more robust.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Diffstat (limited to 'gentree.py')
-rwxr-xr-x | gentree.py | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -418,10 +418,8 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None, disable_kconfig = [] disable_makefile = [] for sym in maketree.get_impossible_symbols(): - if sym[:7] == 'CPTCFG_': - disable_kconfig.append(sym[7:]) - else: - disable_makefile.append(sym[7:]) + disable_kconfig.append(sym[7:]) + disable_makefile.append(sym[7:]) configtree.disable_symbols(disable_kconfig) git_debug_snapshot(args, "disable impossible kconfig symbols") @@ -446,12 +444,12 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None, # groups -- 50 seemed safer and is still fast) regexes = [] for some_symbols in [disable_makefile[i:i + 50] for i in range(0, len(disable_makefile), 50)]: - r = '(CONFIG_(' + '|'.join([s for s in some_symbols]) + '))' + r = '((CPTCFG|CONFIG)_(' + '|'.join([s for s in some_symbols]) + '))' regexes.append(re.compile(r, re.MULTILINE)) for f in maketree.get_makefiles(): data = open(f, 'r').read() for r in regexes: - data = r.sub(r'IMPOSSIBLE_\2', data) + data = r.sub(r'IMPOSSIBLE_\3', data) fo = open(f, 'w') fo.write(data) fo.close() |