Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373710
b: refs/heads/master
c: 9e39555
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Palix authored and Michal Marek committed Apr 8, 2013
1 parent bd41386 commit 86a905a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35d88a38710583f3b5afc3255d7bc190a50e1af7
refs/heads/master: 9e395550779efa07ee00809a041534b9641fb7a7
25 changes: 13 additions & 12 deletions trunk/scripts/coccicheck
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

SPATCH="`which ${SPATCH:=spatch}`"

Expand All @@ -11,24 +11,25 @@ else
VERBOSE=0
fi

FLAGS="-very_quiet"

# spatch only allows include directories with the syntax "-I include"
# while gcc also allows "-Iinclude" and "-include include"
COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
COCCIINCLUDE=${COCCIINCLUDE//-include/-I}

if [ "$C" = "1" -o "$C" = "2" ]; then
ONLINE=1

# This requires Coccinelle >= 0.2.3
# FLAGS="-ignore_unknown_options -very_quiet"
# OPTIONS=$*

# Workaround for Coccinelle < 0.2.3
FLAGS="-I $srctree/include -very_quiet"
shift $(( $# - 1 ))
OPTIONS=$1
# Take only the last argument, which is the C file to test
shift $(( $# - 1 ))
OPTIONS="$COCCIINCLUDE $1"
else
ONLINE=0
FLAGS="-very_quiet"
if [ "$KBUILD_EXTMOD" = "" ] ; then
OPTIONS="-dir $srctree"
OPTIONS="-dir $srctree $COCCIINCLUDE"
else
OPTIONS="-dir $KBUILD_EXTMOD -patch $srctree -I $srctree/include -I $KBUILD_EXTMOD/include"
OPTIONS="-dir $KBUILD_EXTMOD -patch $srctree $COCCIINCLUDE"
fi
fi

Expand Down

0 comments on commit 86a905a

Please sign in to comment.