aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Dietsche <Gregory.Dietsche@cuw.edu>2011-11-05 21:59:43 -0400
committerMichal Marek <mmarek@suse.cz>2012-01-14 16:25:40 -0500
commitd0bc1fb4672b978b608400a5112249cdbc28f9ae (patch)
tree5570ade8bf0919055925fce7a01832e942e53d38
parentff894e396b4d0b5383127c1bcb2cd3879946526e (diff)
coccicheck: add M= option to control which dir is processed
Examples: make coccicheck M=drivers/net/wireless/ make coccicheck SUBDIRS=drivers/net/wireless/ Version 2: fix patch file names when using M= tell coccinelle where the include files are Version 3: Add second include option to support out of tree development Fix error message Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
-rwxr-xr-xscripts/coccicheck19
1 files changed, 14 insertions, 5 deletions
diff --git a/scripts/coccicheck b/scripts/coccicheck
index 1bb1a1bd2daa..3c2776466d87 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -9,14 +9,23 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
9# FLAGS="-ignore_unknown_options -very_quiet" 9# FLAGS="-ignore_unknown_options -very_quiet"
10# OPTIONS=$* 10# OPTIONS=$*
11 11
12# Workaround for Coccinelle < 0.2.3 12 if [ "$KBUILD_EXTMOD" = "" ] ; then
13 FLAGS="-I $srctree/include -very_quiet" 13 # Workaround for Coccinelle < 0.2.3
14 shift $(( $# - 1 )) 14 FLAGS="-I $srctree/include -very_quiet"
15 OPTIONS=$1 15 shift $(( $# - 1 ))
16 OPTIONS=$1
17 else
18 echo M= is not currently supported when C=1 or C=2
19 exit 1
20 fi
16else 21else
17 ONLINE=0 22 ONLINE=0
18 FLAGS="-very_quiet" 23 FLAGS="-very_quiet"
19 OPTIONS="-dir $srctree" 24 if [ "$KBUILD_EXTMOD" = "" ] ; then
25 OPTIONS="-dir $srctree"
26 else
27 OPTIONS="-dir $KBUILD_EXTMOD -patch $srctree -I $srctree/include -I $KBUILD_EXTMOD/include"
28 fi
20fi 29fi
21 30
22if [ ! -x "$SPATCH" ]; then 31if [ ! -x "$SPATCH" ]; then