History

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

Greg Dietsche committed 15 years ago

Commit d0bc1fb1 parent ff894e31 file · +14 −5Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/coccicheck+14−5
@@ -9,14 +9,23 @@ if [ "$C" = "1" -o "$C" = "2" ]; then · 8 unmodified lines
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.312 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=$115 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
16else21else
17 ONLINE=022 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
20fi29fi
21 30
22if [ ! -x "$SPATCH" ]; then31if [ ! -x "$SPATCH" ]; then