When the M variable is used, the -patch option should be given to spatch. This patch fixes the case where C is used.
Unified · Split
| @@ -29,10 +29,14 @@ else · 28 unmodified lines | ||
| 29 | 29 | if [ "$KBUILD_EXTMOD" = "" ] ; then |
| 30 | 30 | OPTIONS="-dir $srctree $COCCIINCLUDE" |
| 31 | 31 | else |
| 32 | − OPTIONS="-dir $KBUILD_EXTMOD -patch $srctree $COCCIINCLUDE" | |
| 32 | + OPTIONS="-dir $KBUILD_EXTMOD $COCCIINCLUDE" | |
| 33 | 33 | fi |
| 34 | 34 | fi |
| 35 | 35 | |
| 36 | +if [ "$KBUILD_EXTMOD" != "" ] ; then | |
| 37 | + OPTIONS="-patch $srctree $OPTIONS" | |
| 38 | +fi | |
| 39 | + | |
| 36 | 40 | if [ ! -x "$SPATCH" ]; then |
| 37 | 41 | echo 'spatch is part of the Coccinelle project and is available at http://coccinelle.lip6.fr/' |
| 38 | 42 | exit 1 |