* [PATCH] gentree: fix Makefile symbol disabling
@ 2015-11-06 8:16 Johannes Berg
2015-11-07 17:07 ` Hauke Mehrtens
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2015-11-06 8:16 UTC (permalink / raw)
To: backports; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
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>
---
gentree.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gentree.py b/gentree.py
index 636ea609ba57..772095fcf580 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()
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe backports" in
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gentree: fix Makefile symbol disabling
2015-11-06 8:16 [PATCH] gentree: fix Makefile symbol disabling Johannes Berg
@ 2015-11-07 17:07 ` Hauke Mehrtens
0 siblings, 0 replies; 2+ messages in thread
From: Hauke Mehrtens @ 2015-11-07 17:07 UTC (permalink / raw)
To: Johannes Berg, backports; +Cc: Johannes Berg
On 11/06/2015 09:16 AM, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> 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>
> ---
> gentree.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Thank you for the patch, it was applied.
Hauke
--
To unsubscribe from this list: send the line "unsubscribe backports" in
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-07 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-06 8:16 [PATCH] gentree: fix Makefile symbol disabling Johannes Berg
2015-11-07 17:07 ` Hauke Mehrtens
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.