Re: [PoC] coccinelle: make Coccinelle-related make targets more fine-grained
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Aug 3, 2018, 06:21 UTC
- Message-ID
- <20180803062144.GB237521@aiede.svl.corp.google.com>
- In-Reply-To
- <20180802183145.GA23690@sigill.intra.peff.net>
Hi,
Jeff King wrote:
> On Thu, Aug 02, 2018 at 02:01:55PM -0400, Jeff King wrote:
Show 14 quoted lines
>> I suspect if we go with the one-spatch-per-source route, though, that we >> could do this just with regular make rules. > > Yeah, it's pretty straightforward: > > diff --git a/Makefile b/Makefile > index d616c0412..86fdcf567 100644 > --- a/Makefile > +++ b/Makefile > @@ -2674,15 +2674,17 @@ COCCI_SOURCES = $(filter-out sha1collisiondetection/%,$(C_SOURCES)) > else > COCCI_SOURCES = $(filter-out sha1dc/%,$(C_SOURCES)) > endif > +COCCI_COMBINED = contrib/coccinelle/combined.cocci
I like this approach.
[...]
> I guess you could even replace "COCCI_COMBINED" with "COCCI_PATCH" in > most of the targets, and that would let people do individual: > > make COCCI_PATCH=contrib/coccinelle/foo.cocci coccicheck
The issue here is that the dependencies for foo.cocci become unreliable, so I'd rather have a separate target for that (e.g. depending on FORCE) if we go that way.
Thanks, Jonathan