lkml.org 
[lkml]   [2011]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] coccicheck: add M= option to control which dir is processed
Date
Examples:
make coccicheck M=drivers/net/wireless/
make coccicheck SUBDIRS=drivers/net/wireless/

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
---
scripts/coccicheck | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index 1bb1a1b..6f08efa 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -10,13 +10,22 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
# OPTIONS=$*

# Workaround for Coccinelle < 0.2.3
- FLAGS="-I $srctree/include -very_quiet"
+ if [ "$KBUILD_EXTMOD" = "" ] ; then
+ FLAGS="-I $srctree/include -very_quiet"
+ else
+ echo 'M= is only supported for Coccinelle >= 0.2.3'
+ exit 1
+ fi
shift $(( $# - 1 ))
OPTIONS=$1
else
ONLINE=0
FLAGS="-very_quiet"
- OPTIONS="-dir $srctree"
+ if [ "$KBUILD_EXTMOD" = "" ] ; then
+ OPTIONS="-dir $srctree"
+ else
+ OPTIONS="-dir $KBUILD_EXTMOD"
+ fi
fi

if [ ! -x "$SPATCH" ]; then
--
1.7.2.5


\
 
 \ /
  Last update: 2011-06-08 05:33    [W:0.081 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site