diff options
Diffstat (limited to 'scripts/coccicheck')
-rwxr-xr-x | scripts/coccicheck | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/coccicheck b/scripts/coccicheck index b8bcf1f7bed7..ef78c875a0e3 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck | |||
@@ -25,7 +25,7 @@ fi | |||
25 | 25 | ||
26 | if [ "$MODE" = "" ] ; then | 26 | if [ "$MODE" = "" ] ; then |
27 | if [ "$ONLINE" = "0" ] ; then | 27 | if [ "$ONLINE" = "0" ] ; then |
28 | echo 'You have not explicitly specify the mode to use. Fallback to "report".' | 28 | echo 'You have not explicitly specified the mode to use. Fallback to "report".' |
29 | echo 'You can specify the mode with "make coccicheck MODE=<mode>"' | 29 | echo 'You can specify the mode with "make coccicheck MODE=<mode>"' |
30 | echo 'Available modes are: report, patch, context, org' | 30 | echo 'Available modes are: report, patch, context, org' |
31 | fi | 31 | fi |
@@ -52,10 +52,12 @@ coccinelle () { | |||
52 | 52 | ||
53 | FILE=`echo $COCCI | sed "s|$srctree/||"` | 53 | FILE=`echo $COCCI | sed "s|$srctree/||"` |
54 | 54 | ||
55 | echo "Processing `basename $COCCI` with option(s) \"$OPT\"" | 55 | echo "Processing `basename $COCCI`" |
56 | echo "with option(s) \"$OPT\"" | ||
57 | echo '' | ||
56 | echo 'Message example to submit a patch:' | 58 | echo 'Message example to submit a patch:' |
57 | 59 | ||
58 | sed -e '/\/\/\//!d' -e 's|^///||' $COCCI | 60 | sed -ne 's|^///||p' $COCCI |
59 | 61 | ||
60 | echo ' The semantic patch that makes this change is available' | 62 | echo ' The semantic patch that makes this change is available' |
61 | echo " in $FILE." | 63 | echo " in $FILE." |
@@ -64,6 +66,12 @@ coccinelle () { | |||
64 | echo ' http://coccinelle.lip6.fr/' | 66 | echo ' http://coccinelle.lip6.fr/' |
65 | echo '' | 67 | echo '' |
66 | 68 | ||
69 | if [ "`sed -ne 's|^//#||p' $COCCI`" ] ; then | ||
70 | echo 'Semantic patch information:' | ||
71 | sed -ne 's|^//#||p' $COCCI | ||
72 | echo '' | ||
73 | fi | ||
74 | |||
67 | $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1 | 75 | $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1 |
68 | else | 76 | else |
69 | $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1 | 77 | $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1 |