From a98ce4b067bd2550a77210d52b285d465a6566f3 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sat, 19 Mar 2011 01:20:54 -0700 Subject: [PATCH] Add build.pl --deps to dump dependencies. --- build.pl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/build.pl b/build.pl index a299b1c83..07023172e 100755 --- a/build.pl +++ b/build.pl @@ -28,6 +28,7 @@ my $opt_list; my $opt_eachclean; my $opt_verbose; my $opt_test; +my $opt_deps; chdir($FindBin::Bin) or die "Couldn't chdir to $FindBin::Bin: $!"; @@ -35,6 +36,7 @@ GetOptions("list" => \$opt_list, "eachclean" => \$opt_eachclean, "verbose" => \$opt_verbose, "test" => \$opt_test, + "deps" => \$opt_deps, ) or usage(); sub usage { @@ -47,6 +49,7 @@ Usage: build.pl --list build.pl --eachclean # builds each target with a full clean before it # (for testing that dependencies are correct) + build.pl --deps # Show each target's dependencies Other options: --verbose|-v Verbose @@ -64,7 +67,16 @@ if ($opt_list) { foreach my $target (sort keys %targets) { print " * $target\n"; } - exit; + exit; +} + +if ($opt_deps) { + foreach my $target (sort keys %targets) { + find_go_camli_deps($target); + my $t = $targets{$target} or die; + print "$target: @{ $t->{deps} }\n"; + } + exit; } if ($opt_eachclean) {