make module-deps.pl work in separate builddir

Change-Id: I951e5b760fa4749cb712a927110e702949e0eaa3
This commit is contained in:
Peter Foley 2013-03-26 12:47:06 -04:00
parent cac094a77f
commit ca9435ecbb

View file

@ -6,6 +6,7 @@ use Getopt::Long qw(GetOptions VersionMessage);
use Pod::Usage;
my $gnumake;
my $src_root;
my $makefile_build;
my $verbose = 0;
my $from_file;
@ -162,9 +163,9 @@ sub prune_redundant_deps($)
sub create_lib_module_map()
{
my %l2m;
for (glob("*/Library_*.mk"))
for (glob($src_root."/*/Library_*.mk"))
{
/(.*)\/Library_(.*)\.mk/;
/.*\/(.*)\/Library_(.*)\.mk/;
# add module -> module
$l2m{$1} = $1;
# add lib -> module
@ -303,6 +304,7 @@ sub parse_options()
($gnumake, $makefile_build) = @ARGV if $#ARGV == 1;
$gnumake = 'make' if (!defined $gnumake);
$makefile_build = 'Makefile.gbuild' if (!defined $makefile_build);
$src_root = defined $ENV{SRC_ROOT} ? $ENV{SRC_ROOT} : ".";
}
sub main()