Make checksrc.pl work on more out-of-tree builds
authorYang Tse <yangsita@gmail.com>
Thu, 26 May 2011 17:17:10 +0000 (19:17 +0200)
committerYang Tse <yangsita@gmail.com>
Thu, 26 May 2011 17:17:10 +0000 (19:17 +0200)
Source files given with relative paths do not have the
-D directory specifier prepended.

lib/checksrc.pl

index 019406b..5d36949 100755 (executable)
@@ -81,7 +81,7 @@ if(!$file) {
 do {
     if($file ne "$wlist") {
         my $fullname = $file;
-        $fullname = "$dir/$file" if $fullname !~ '^/';
+        $fullname = "$dir/$file" if ($fullname !~ '^\.?\.?/');
         scanfile($fullname);
     }
     $file = shift @ARGV;