On Fri, 4 Jun 2021, Jonas Schrottenbaum wrote:

> Hello, 
> i'm currently trying to check out coccinelle and already could apply a simple 
> semantic patch to a small C program with the spatch command.
> Please excuse me, but i'm quite a beginner in this field.  
> I read on this page, about coccicheck and the different modes.
> It says, that i have to run: 
> make coccicheck MODE=report
> or
> make coccicheck MODE=patch
> in order to switch the mode.

All of this is only for the Linux kernel.  Coccicheck is a target in the
Linux kernel make file.

> But where do i have to run this? Is this just for using coccinelle on the 
> linux kernel? Is it not relevant, if i want to use coccinelle for general C 
> programs?

No, it is not relevant for general C programs.

> I thought it is a make target for coccinelle itself, but there is no target 
> called coccicheck defined in the coccinelle makefile, as far as i can tell.
> So if i run it in the same dir as the make install for coccinelle, all i get 
> is:
> make: *** no rule to make target coccicheck. stop.
> So, am i doing something wrong, or is coccicheck only relevant for linux 
> kernel development?
> It says: "A Coccinelle-specific target is defined in the top level Makefile."
> which Makefile? The linux top level Makefile?

you should run spatch directly for other software.  Here is a document
that describes common usages and the complete set of command line options
(it is a little bit out of date, but everything there should still be


Cocci mailing list

Reply via email to