avoid rdep in the top level make process (subdir.mk) - it leaks too much memory and...
[openwrt-10.03/.git] / scripts / timestamp.pl
index a4c5cae0150822434544dd8412d6db9b5db9ee0a..89ec4e70c310b9a81c888c0978aae1bc41456eff 100755 (executable)
@@ -39,6 +39,9 @@ while (@ARGV > 0) {
                $options{"findopts"} .= " -and -not -path \\*".$str."\\*"
        } elsif ($path =~ /^-f/) {
                $options{"findopts"} .= " -follow";
+       } elsif ($path =~ /^-n/) {
+               my $arg = $ARGV[0];
+               $options{$path} = $arg;
        } elsif ($path =~ /^-/) {
                $options{$path} = 1;
        } else {
@@ -54,7 +57,9 @@ while (@ARGV > 0) {
        }
 }
 
-if ($options{"-p"}) {
+if ($options{"-n"}) {
+       exit ($n eq $options{"-n"} ? 0 : 1);
+} elsif ($options{"-p"}) {
        print "$n\n";
 } elsif ($options{"-t"}) {
        print "$ts\n";