summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-11-06 09:16:10 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2015-11-15 19:23:21 +0100
commitfa47b1d182d8c16f3a71f78064bd246c8336154b (patch)
treecb1c191c8499034707a244415121bafa45ec79bc
parent3f4861fb332bb3d6f805fd5b84e6d031e2fdf8c5 (diff)
gentree: fix Makefile symbol disabling
Upstream commit: 4645e84f83e0fff9fe771c3a3656fcbb9ba729fa 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>
-rwxr-xr-xgentree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gentree.py b/gentree.py
index 636ea609..772095fc 100755
--- a/gentree.py
+++ b/gentree.py
@@ -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()