X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=scripts%2Fcoccicheck;h=3c2776466d877325d63b1980b798b8b0f9d6f556;hb=36e4d267f3a0b2c04ec965eb8f821315e084e8a9;hp=1bb1a1bd2daa832b234edbec3765861d4f41010d;hpb=6d1f23f204c9e4638bd30ff3a768c47e40cd3ac0;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 # FLAGS="-ignore_unknown_options -very_quiet" # OPTIONS=$* -# Workaround for Coccinelle < 0.2.3 - FLAGS="-I $srctree/include -very_quiet" - shift $(( $# - 1 )) - OPTIONS=$1 + if [ "$KBUILD_EXTMOD" = "" ] ; then + # Workaround for Coccinelle < 0.2.3 + FLAGS="-I $srctree/include -very_quiet" + shift $(( $# - 1 )) + OPTIONS=$1 + else + echo M= is not currently supported when C=1 or C=2 + exit 1 + fi else ONLINE=0 FLAGS="-very_quiet" - OPTIONS="-dir $srctree" + if [ "$KBUILD_EXTMOD" = "" ] ; then + OPTIONS="-dir $srctree" + else + OPTIONS="-dir $KBUILD_EXTMOD -patch $srctree -I $srctree/include -I $KBUILD_EXTMOD/include" + fi fi if [ ! -x "$SPATCH" ]; then