summaryrefslogtreecommitdiff
authorkergoth <kergoth>2002-11-29 18:59:06 (UTC)
committer kergoth <kergoth>2002-11-29 18:59:06 (UTC)
commitbd692f7ebe04e23151cce39baf311b925ccf91b1 (patch) (side-by-side diff)
treed573648934c2aa230a44ebecac29f3af097dd381
parentbd0a4c6311c55370fa7e00255f919537d81801dc (diff)
downloadopie-bd692f7ebe04e23151cce39baf311b925ccf91b1.zip
opie-bd692f7ebe04e23151cce39baf311b925ccf91b1.tar.gz
opie-bd692f7ebe04e23151cce39baf311b925ccf91b1.tar.bz2
Silence some of those annoying errors in dependency generation
Diffstat (more/less context) (show whitespace changes)
-rwxr-xr-xscripts/deps.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/deps.pl b/scripts/deps.pl
index 56c4e77..feced6e 100755
--- a/scripts/deps.pl
+++ b/scripts/deps.pl
@@ -1,73 +1,77 @@
#!/usr/bin/perl -w
use strict;
my %depends;
my %tokenpath;
sub getdepends ($$)
{
my ($token, $path, $intoken);
$token = shift || return;
$token =~ s/CONFIG_//;
$path = shift || return;
#print "opening $path/config.in\n";
# print "token is $token\n";
open( FILE, "< $path/config.in" ) || return;
$intoken = 0;
while( <FILE> ) {
if( $intoken == 1 ) {
/depends\S*(.*)/ && return $1;
if( /\S*(config|menu)/ ) {
$intoken = 0;
return;
}
} else {
/$token/ || next;
$intoken = 1;
}
/$token/ || next;
}
close( FILE );
return;
}
sub makedepends ($$)
{
my ($depends, $tokenpath, $token, $depword, $mustbesep, $state);
$depends = shift || return;
$tokenpath = shift || return;
$mustbesep = 0;
for $token (keys %$depends){
print ${$tokenpath}{$token} . " : ";
for (split(/\s+/, ${$depends}{$token})){
/^\s+$/ && next;
/\&\&/ && next;
/\|\|/ && next;
/^$/ && next;
+ /^\($/ && next;
+ /^\)$/ && next;
+ /^on$/ && next;
+ /^!$/ && next;
if(defined(${$tokenpath}{"CONFIG_" . $_})){
print '$(if $(CONFIG_' . $_ . '),' . ${$tokenpath}{"CONFIG_" . $_} . ') ';
} else {
- print STDERR "ERROR in dependency generation, unable to locate path for token CONFIG_$_\n";
+ print STDERR "Warning: unable to locate path for token CONFIG_$_\n";
}
}
print "\n";
}
}
while( <> ) {
my $dep;
my ($token, $path, $pro);
chomp;
s/^\s*//g;
s/\s*$//g;
($token, $path, $pro) = split(/\s+/,$_);
$tokenpath{$token} = $path;
$dep = getdepends($token, $path);
if( $dep ) {
$depends{$token} = $dep;
}
}
makedepends(\%depends, \%tokenpath);