Do not mishandle further libs without dependencies

...besides sal/Library_sal.mk, like i18npool/Library_collator_data.mk.

Change-Id: I2d86540bd8123410972496047fdb59ebcf35968f
This commit is contained in:
Stephan Bergmann 2014-04-11 15:09:31 +02:00
parent 07f90c89ef
commit 68242e8c29

View file

@ -218,14 +218,18 @@ sub collapse_lib_to_module($)
my %unknown_libs;
for my $name (sort keys %{$tree}) {
my $result = $tree->{$name};
$unknown_libs{$name} = 1 && next if (!grep {/$name/} keys $l2m);
$name = $l2m->{$name};
# sal has no dependencies, take care of it
# otherwise it doesn't have target key
if (!@{$result->{deps}}) {
if (!exists($digraph{$name})) {
my @empty;
$digraph{$name}{deps} = \@empty;
$digraph{$name}{target} = $result->{target};
}
}
for my $dep (@{$result->{deps}}) {
$unknown_libs{$name} = 1 && next if (!grep {/$name/} keys $l2m);
$name = $l2m->{$name};
$dep = $l2m->{$dep};
# ignore: two libraries from the same module depend on each other
next if ($name eq $dep);