[PATCH] Makefile: detect errors in running spatch

2017-03-29 Thread Jeff King
The "make coccicheck" target runs spatch against each source file. But it does so in a for loop, so "make" never sees the exit code of spatch. Worse, it redirects stderr to a log file, so the user has no indication of any failure. And then to top it all off, because we touched the patch file's mtim

Re: [PATCH] Makefile: detect errors in running spatch

2017-03-10 Thread Junio C Hamano
Jeff King writes: > It also doesn't help that shells are awkward at passing status out of a > for-loop. I think the most "make-ish" way of doing this would actually > be to lose the for loop and have a per-cocci-per-source target. As we assume we can freely use GNUmake facilities, another option

Re: [PATCH] Makefile: detect errors in running spatch

2017-03-10 Thread Jeff King
On Fri, Mar 10, 2017 at 06:03:47PM +0100, René Scharfe wrote: > > This shell code is getting a bit unwieldy to stick inside the Makefile, > > with all the line continuation and $-escaping. It might be worth moving > > it into a helper script. > > There is one for the kernel > (https://git.kerne

Re: [PATCH] Makefile: detect errors in running spatch

2017-03-10 Thread René Scharfe
Am 10.03.2017 um 09:31 schrieb Jeff King: The "make coccicheck" target runs spatch against each source file. But it does so in a for loop, so "make" never sees the exit code of spatch. Worse, it redirects stderr to a log file, so the user has no indication of any failure. And then to top it all o

[PATCH] Makefile: detect errors in running spatch

2017-03-10 Thread Jeff King
The "make coccicheck" target runs spatch against each source file. But it does so in a for loop, so "make" never sees the exit code of spatch. Worse, it redirects stderr to a log file, so the user has no indication of any failure. And then to top it all off, because we touched the patch file's mtim