forked from mirrors/linux
		
	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: Greg Dietsche <Gregory.Dietsche@cuw.edu> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
		
							parent
							
								
									ff894e396b
								
							
						
					
					
						commit
						d0bc1fb467
					
				
					 1 changed files with 14 additions and 5 deletions
				
			
		| 
						 | 
					@ -9,14 +9,23 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
 | 
				
			||||||
#    FLAGS="-ignore_unknown_options -very_quiet"
 | 
					#    FLAGS="-ignore_unknown_options -very_quiet"
 | 
				
			||||||
#    OPTIONS=$*
 | 
					#    OPTIONS=$*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Workaround for Coccinelle < 0.2.3
 | 
					    if [ "$KBUILD_EXTMOD" = "" ] ; then
 | 
				
			||||||
    FLAGS="-I $srctree/include -very_quiet"
 | 
					        # Workaround for Coccinelle < 0.2.3
 | 
				
			||||||
    shift $(( $# - 1 ))
 | 
					        FLAGS="-I $srctree/include -very_quiet"
 | 
				
			||||||
    OPTIONS=$1
 | 
					        shift $(( $# - 1 ))
 | 
				
			||||||
 | 
					        OPTIONS=$1
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
						echo M= is not currently supported when C=1 or C=2
 | 
				
			||||||
 | 
						exit 1
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    ONLINE=0
 | 
					    ONLINE=0
 | 
				
			||||||
    FLAGS="-very_quiet"
 | 
					    FLAGS="-very_quiet"
 | 
				
			||||||
    OPTIONS="-dir $srctree"
 | 
					    if [ "$KBUILD_EXTMOD" = "" ] ; then
 | 
				
			||||||
 | 
					        OPTIONS="-dir $srctree"
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        OPTIONS="-dir $KBUILD_EXTMOD -patch $srctree -I $srctree/include -I $KBUILD_EXTMOD/include"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ ! -x "$SPATCH" ]; then
 | 
					if [ ! -x "$SPATCH" ]; then
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue