diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-11-06 09:16:10 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2015-11-07 16:53:37 +0100 |
commit | 4645e84f83e0fff9fe771c3a3656fcbb9ba729fa (patch) | |
tree | e5aec39e7239b3e126f272c43cd1c4da82ce151d /gentree.py | |
parent | 6fa385b4fbaa14f2a9b5a25dd95a7e15b8137ed8 (diff) |
gentree: fix Makefile symbol disabling
Currently, a Makefile line like this:
obj-$(CONFIG_IPW2100) += ipw2x00/
will get mangled into
#obj-$(CONFIG_IPW2100+= ipw2x00/
when disabled by the gentree script. Fix the regular
expression to contain the entire match as the first
group, so it gets all preserved when replaced later
by "#\1" using expression.sub().
This then makes it come out as
#obj-$(CONFIG_IPW2100) += ipw2x00/
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'gentree.py')
-rwxr-xr-x | gentree.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1057,7 +1057,7 @@ def process(kerneldir, 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 = '^([^#].*((' + bpid.full_prefix_resafe + '|CONFIG_)(' + '|'.join([s for s in some_symbols]) + ')))\W' + r = '^(([^#].*((' + bpid.full_prefix_resafe + '|CONFIG_)(' + '|'.join([s for s in some_symbols]) + ')))\W)' regexes.append(re.compile(r, re.MULTILINE)) for f in maketree.get_makefiles(): data = open(f, 'r').read() |