summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2013-03-26 12:47:06 -0400
committerPeter Foley <pefoley2@verizon.net>2013-03-26 14:22:19 -0400
commitca9435ecbbf27e1d49a89956c80b527ae5c3efd1 (patch)
tree622fa7610b772b5a8a3a25551af2105b43905c1f /bin
parentcac094a77f83face15ca40e51033119589756b8e (diff)
make module-deps.pl work in separate builddir
Change-Id: I951e5b760fa4749cb712a927110e702949e0eaa3
Diffstat (limited to 'bin')
-rwxr-xr-xbin/module-deps.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/module-deps.pl b/bin/module-deps.pl
index a46634a24061..7f39b589b26c 100755
--- a/bin/module-deps.pl
+++ b/bin/module-deps.pl
@@ -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()