Re: [PATCH v2] checkpatch: kbuild: if_changed: check for multiple calls in targets

2018-07-20 Thread Segher Boessenkool
On Fri, Jul 20, 2018 at 08:33:56AM -0700, Joe Perches wrote: > 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

Re: [PATCH v2] checkpatch: kbuild: if_changed: check for multiple calls in targets

2018-07-20 Thread Segher Boessenkool
On Fri, Jul 20, 2018 at 08:33:56AM -0700, Joe Perches wrote: > 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

Re: [PATCH v2] checkpatch: kbuild: if_changed: check for multiple calls in targets

2018-07-20 Thread Segher Boessenkool
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

Re: [PATCH v2] checkpatch: kbuild: if_changed: check for multiple calls in targets

2018-07-20 Thread Segher Boessenkool
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

Re: [PATCH v2] checkpatch: kbuild: if_changed: check for multiple calls in targets

2018-07-20 Thread Joe Perches
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

Re: [PATCH v2] checkpatch: kbuild: if_changed: check for multiple calls in targets

2018-07-20 Thread Joe Perches
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

Re: [PATCH v2] checkpatch: kbuild: if_changed: check for multiple calls in targets

2018-07-20 Thread Joe Perches
On Fri, 2018-07-20 at 09:48 +0200, Dirk Gouders wrote: > The kbuild function if_changed should not be called more than once for > a target. > > Because that function writes the command line to a .cmd file for later > tests, multiple calls of it within a target would result in overwrites > of

Re: [PATCH v2] checkpatch: kbuild: if_changed: check for multiple calls in targets

2018-07-20 Thread Joe Perches
On Fri, 2018-07-20 at 09:48 +0200, Dirk Gouders wrote: > The kbuild function if_changed should not be called more than once for > a target. > > Because that function writes the command line to a .cmd file for later > tests, multiple calls of it within a target would result in overwrites > of

[PATCH v2] checkpatch: kbuild: if_changed: check for multiple calls in targets

2018-07-20 Thread Dirk Gouders
The kbuild function if_changed should not be called more than once for a target. Because that function writes the command line to a .cmd file for later tests, multiple calls of it within a target would result in overwrites of previous values and effectively render the command line test

[PATCH v2] checkpatch: kbuild: if_changed: check for multiple calls in targets

2018-07-20 Thread Dirk Gouders
The kbuild function if_changed should not be called more than once for a target. Because that function writes the command line to a .cmd file for later tests, multiple calls of it within a target would result in overwrites of previous values and effectively render the command line test