aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorNicolas Palix <npalix.work@gmail.com>2010-10-08 15:27:38 -0400
committerMichal Marek <mmarek@suse.cz>2010-10-13 08:26:06 -0400
commit3c908417677f890265ff9d5efd372207cf75fd45 (patch)
tree5ccfc8a00c10c6f46b16fd21d4b5a7aa87f2742b /scripts
parent32af08987b8f093195f8eef3ee4e1dbcfee891cd (diff)
Coccinelle: Improve user information with a new kind of comment
Improve user information with a new kind of comment about semantic patch output. Fix spelling. Signed-off-by: Nicolas Palix <npalix.work@gmail.com> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/coccicheck14
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
26if [ "$MODE" = "" ] ; then 26if [ "$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