]> granicus.if.org Git - curl/commitdiff
Make checksrc.pl work on out-of-tree builds
authorDan Fandrich <dan@coneharvesters.com>
Wed, 27 Apr 2011 19:42:15 +0000 (12:42 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Wed, 27 Apr 2011 19:42:15 +0000 (12:42 -0700)
Source files given with absolute paths do not have the
-D directory specifier prepended.

lib/checksrc.pl

index c1056d26c1da666074444cbf3d8237403d07ddf1..99bbc74d00c7172c7add5e8799b8426454a1b68f 100755 (executable)
@@ -79,9 +79,10 @@ if(!$file) {
 }
 
 do {
-
     if($file ne "$wlist") {
-        scanfile("$dir/$file");
+        my $fullname = $file;
+        $fullname = "$dir/$file" if $fullname !~ '^/';
+        scanfile($fullname);
     }
     $file = shift @ARGV;