public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] coccicheck: use $KBUILD_EXTMOD when available
@ 2010-07-03 15:20 Kulikov Vasiliy
  2010-07-03 19:49 ` Nicolas Palix
  2010-07-05 12:48 ` Nicolas Palix
  0 siblings, 2 replies; 6+ messages in thread
From: Kulikov Vasiliy @ 2010-07-03 15:20 UTC (permalink / raw)
  To: Kernel Janitors
  Cc: Julia Lawall, Gilles Muller, Nicolas Palix, Michal Marek,
	Sam Ravnborg, Joerg Roedel, cocci, linux-kernel

Use $KBUILD_EXTMOD instead of $srctree when the latter is not null
to use make M=somedir.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
 scripts/coccicheck |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index b8bcf1f..7d66a55 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -1,5 +1,11 @@
 #!/bin/sh
 
+if [ -n "$KBUILD_EXTMOD" ]; then
+	CHECK_DIR="$KBUILD_EXTMOD"
+else
+	CHECK_DIR="$srctree"
+fi
+
 SPATCH="`which ${SPATCH:=spatch}`"
 
 if [ "$C" = "1" -o "$C" = "2" ]; then
@@ -64,7 +70,7 @@ coccinelle () {
 	echo ' http://coccinelle.lip6.fr/'
 	echo ''
 
-	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
+	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
     else
 	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
     fi
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-07-07 13:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-03 15:20 [PATCH] coccicheck: use $KBUILD_EXTMOD when available Kulikov Vasiliy
2010-07-03 19:49 ` Nicolas Palix
2010-07-04  8:41   ` Kulikov Vasiliy
2010-07-07 11:04   ` Michal Marek
2010-07-07 12:22     ` Nicolas Palix
2010-07-05 12:48 ` Nicolas Palix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox