lkml.org 
[lkml]   [2018]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] checkpatch: kbuild: if_changed: check for multiple calls in targets
From
Date
On Fri, 2018-07-20 at 10:21 -0500, Segher Boessenkool wrote:
> On Fri, Jul 20, 2018 at 03:06:37AM -0700, Joe Perches wrote:
> > On Fri, 2018-07-20 at 09:48 +0200, Dirk Gouders wrote:
> > > + # Check for multiple calls of if_changed within a target in Makefiles
> > > + if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) &&
> >
> > The uses of .* here are superfluous.
>
> And it looks like you wanted to match this only at the beginning of the
> string, which would be /^Makefile/ etc.

Nope.

$realfile includes path and /^Makefile/ matches only the
top level Makefile and none of the ones in subdirectories.


\
 
 \ /
  Last update: 2018-07-20 17:37    [W:0.033 / U:1.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site