[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1307806173-24964-1-git-send-email-Gregory.Dietsche@cuw.edu>
Date: Sat, 11 Jun 2011 10:29:33 -0500
From: Greg Dietsche <Gregory.Dietsche@....edu>
To: julia@...u.dk
Cc: Nicolas.Palix@...ia.fr, rdunlap@...otime.net,
Gilles.Muller@...6.fr, cocci@...u.dk, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org,
Greg Dietsche <Gregory.Dietsche@....edu>
Subject: [PATCH 1/2 V2] 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
Signed-off-by: Greg Dietsche <Gregory.Dietsche@....edu>
---
scripts/coccicheck | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/scripts/coccicheck b/scripts/coccicheck
index 1bb1a1b..1ceecdf 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 -patch $srctree -I $srctree/include"
+ fi
fi
if [ ! -x "$SPATCH" ]; then
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists