[U-Boot] [PATCH 1/1] Makefile: add coccicheck target

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Nov 14 16:21:14 UTC 2017


On 11/14/2017 10:34 AM, Masahiro Yamada wrote:
> Hi.
> 
> 
> 2017-11-11 3:54 GMT+09:00 Heinrich Schuchardt <xypron.glpk at gmx.de>:
>> Coccinelle is a program for static code analysis.
>> For details on Coccinelle see
>>
>>          http://coccinelle.lip6.fr/
>>
>> Add scripts/coccicheck and Documentation/dev-tools/coccinelle.rst
>> copied from Linux kernel v4.14-rc8.
>>
>> The coccicheck script executes the tests *.cocci in
>> directory scripts/coccinelle by calling spatch.
>>
>> In Makefile add a coccicheck target. You can use it with
>>
>>          make coccicheck MODE=<mode>
>>
>> where mode in patch, report, context, org.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> 
> You can run "make coccicheck" without the .config file.
> So, you need to add coccinelle to no-dot-config-targets.
> 
> 
> Refer to the following code in Linux.
> 
> no-dot-config-targets := clean mrproper distclean \
>                           cscope gtags TAGS tags help% %docs check% coccicheck \
>                           $(version_h) headers_% archheaders archscripts \
>                           kernelversion %src-pkg
> 

For whatever reason the Makefile without my patch already had a 
coccicheck entry in this list.

We should not add it twice.

Best regards

Heinrich


More information about the U-Boot mailing list