lkml.org 
[lkml]   [2010]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] coccicheck: use $KBUILD_EXTMOD when available
Date
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


\
 
 \ /
  Last update: 2010-07-03 17:23    [W:0.420 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site