Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0bc1fb4 authored by Greg Dietsche's avatar Greg Dietsche Committed by Michal Marek
Browse files

coccicheck: add M= option to control which dir is processed



Examples:
	make coccicheck M=drivers/net/wireless/
	make coccicheck SUBDIRS=drivers/net/wireless/

Version 2:
	fix patch file names when using M=
	tell coccinelle where the include files are

Version 3:
	Add second include option to support out of tree development
	Fix error message

Signed-off-by: default avatarGreg Dietsche <Gregory.Dietsche@cuw.edu>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent ff894e39
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -9,14 +9,23 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
#    FLAGS="-ignore_unknown_options -very_quiet"
#    OPTIONS=$*

    if [ "$KBUILD_EXTMOD" = "" ] ; then
        # Workaround for Coccinelle < 0.2.3
        FLAGS="-I $srctree/include -very_quiet"
        shift $(( $# - 1 ))
        OPTIONS=$1
    else
	echo M= is not currently supported when C=1 or C=2
	exit 1
    fi
else
    ONLINE=0
    FLAGS="-very_quiet"
    if [ "$KBUILD_EXTMOD" = "" ] ; then
        OPTIONS="-dir $srctree"
    else
        OPTIONS="-dir $KBUILD_EXTMOD -patch $srctree -I $srctree/include -I $KBUILD_EXTMOD/include"
    fi
fi

if [ ! -x "$SPATCH" ]; then