# sure it can get included
if ($dest ne "" && $d =~ /\.(h|pm)$/) {
my $i = dirname($d);
- push @{$unified_info{includes}->{$ddest}}, $i
- unless grep { $_ eq $i } @{$unified_info{includes}->{$ddest}};
+ push @{$unified_info{includes}->{$ddest}->{source}}, $i
+ unless grep { $_ eq $i } @{$unified_info{includes}->{$ddest}->{source}};
}
}
}
}
}
foreach (@{$includes{$dest}}) {
- my $i = cleandir($sourced, $_, $blddir);
- push @{$unified_info{includes}->{$ddest}}, $i
- unless grep { $_ eq $i } @{$unified_info{includes}->{$ddest}};
+ my $is = cleandir($sourced, $_, $blddir);
+ my $ib = cleandir($buildd, $_, $blddir);
+ push @{$unified_info{includes}->{$ddest}->{source}}, $is
+ unless grep { $_ eq $is } @{$unified_info{includes}->{$ddest}->{source}};
+ push @{$unified_info{includes}->{$ddest}->{build}}, $ib
+ unless grep { $_ eq $ib } @{$unified_info{includes}->{$ddest}->{build}};
}
}
}
[ sort keys %{$unified_info{$l1}->{$l2}} ];
}
}
+ # Includes
+ foreach my $dest (sort keys %{$unified_info{includes}}) {
+ if (defined($unified_info{includes}->{$dest}->{build})) {
+ my @source_includes =
+ ( @{$unified_info{includes}->{$dest}->{source}} );
+ $unified_info{includes}->{$dest} =
+ [ @{$unified_info{includes}->{$dest}->{build}} ];
+ foreach my $inc (@source_includes) {
+ push @{$unified_info{includes}->{$dest}}, $inc
+ unless grep { $_ eq $inc } @{$unified_info{includes}->{$dest}};
+ }
+ } else {
+ $unified_info{includes}->{$dest} =
+ [ @{$unified_info{includes}->{$dest}->{source}} ];
+ }
+ }
}
# For the schemes that need it, we provide the old *_obj configs