-rwxr-xr-x | scripts/deps.pl | 6 |
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 | |||
@@ -25,49 +25,53 @@ sub getdepends ($$) | |||
25 | } else { | 25 | } else { |
26 | /$token/ || next; | 26 | /$token/ || next; |
27 | $intoken = 1; | 27 | $intoken = 1; |
28 | } | 28 | } |
29 | /$token/ || next; | 29 | /$token/ || next; |
30 | } | 30 | } |
31 | close( FILE ); | 31 | close( FILE ); |
32 | return; | 32 | return; |
33 | } | 33 | } |
34 | 34 | ||
35 | sub makedepends ($$) | 35 | sub makedepends ($$) |
36 | { | 36 | { |
37 | my ($depends, $tokenpath, $token, $depword, $mustbesep, $state); | 37 | my ($depends, $tokenpath, $token, $depword, $mustbesep, $state); |
38 | $depends = shift || return; | 38 | $depends = shift || return; |
39 | $tokenpath = shift || return; | 39 | $tokenpath = shift || return; |
40 | $mustbesep = 0; | 40 | $mustbesep = 0; |
41 | 41 | ||
42 | for $token (keys %$depends){ | 42 | for $token (keys %$depends){ |
43 | print ${$tokenpath}{$token} . " : "; | 43 | print ${$tokenpath}{$token} . " : "; |
44 | for (split(/\s+/, ${$depends}{$token})){ | 44 | for (split(/\s+/, ${$depends}{$token})){ |
45 | /^\s+$/ && next; | 45 | /^\s+$/ && next; |
46 | /\&\&/ && next; | 46 | /\&\&/ && next; |
47 | /\|\|/ && next; | 47 | /\|\|/ && next; |
48 | /^$/ && next; | 48 | /^$/ && next; |
49 | /^\($/ && next; | ||
50 | /^\)$/ && next; | ||
51 | /^on$/ && next; | ||
52 | /^!$/ && next; | ||
49 | if(defined(${$tokenpath}{"CONFIG_" . $_})){ | 53 | if(defined(${$tokenpath}{"CONFIG_" . $_})){ |
50 | print '$(if $(CONFIG_' . $_ . '),' . ${$tokenpath}{"CONFIG_" . $_} . ') '; | 54 | print '$(if $(CONFIG_' . $_ . '),' . ${$tokenpath}{"CONFIG_" . $_} . ') '; |
51 | } else { | 55 | } else { |
52 | print STDERR "ERROR in dependency generation, unable to locate path for token CONFIG_$_\n"; | 56 | print STDERR "Warning: unable to locate path for token CONFIG_$_\n"; |
53 | } | 57 | } |
54 | } | 58 | } |
55 | print "\n"; | 59 | print "\n"; |
56 | } | 60 | } |
57 | } | 61 | } |
58 | 62 | ||
59 | while( <> ) { | 63 | while( <> ) { |
60 | my $dep; | 64 | my $dep; |
61 | my ($token, $path, $pro); | 65 | my ($token, $path, $pro); |
62 | chomp; | 66 | chomp; |
63 | s/^\s*//g; | 67 | s/^\s*//g; |
64 | s/\s*$//g; | 68 | s/\s*$//g; |
65 | ($token, $path, $pro) = split(/\s+/,$_); | 69 | ($token, $path, $pro) = split(/\s+/,$_); |
66 | $tokenpath{$token} = $path; | 70 | $tokenpath{$token} = $path; |
67 | $dep = getdepends($token, $path); | 71 | $dep = getdepends($token, $path); |
68 | if( $dep ) { | 72 | if( $dep ) { |
69 | $depends{$token} = $dep; | 73 | $depends{$token} = $dep; |
70 | } | 74 | } |
71 | } | 75 | } |
72 | 76 | ||
73 | makedepends(\%depends, \%tokenpath); | 77 | makedepends(\%depends, \%tokenpath); |