Coccinelle: fix incorrect -include option transformation
authorAndrzej Hajda <a.hajda@samsung.com>
Tue, 22 Sep 2015 13:15:30 +0000 (15:15 +0200)
committerMichal Marek <mmarek@suse.com>
Mon, 26 Oct 2015 20:32:09 +0000 (21:32 +0100)
kbuild/gcc uses -include option to include files and -I to provide paths
for #include <> directive. In case of spatch latter option should be
prefixed with two -.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/coccicheck

index bbf901afb606bcbd8c01e09a2b5063f4ae522e76..b2d758188f2f404b22c8c691b87d0e43a0404f5d 100755 (executable)
@@ -30,7 +30,7 @@ FLAGS="$SPFLAGS --very-quiet"
 # spatch only allows include directories with the syntax "-I include"
 # while gcc also allows "-Iinclude" and "-include include"
 COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
-COCCIINCLUDE=${COCCIINCLUDE//-include/-I}
+COCCIINCLUDE=${COCCIINCLUDE// -include/ --include}
 
 if [ "$C" = "1" -o "$C" = "2" ]; then
     ONLINE=1