aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-08-12 16:21:00 +0000
committerlloyd <[email protected]>2009-08-12 16:21:00 +0000
commitdcc23e3f868ed0a6db65e4527dab26af76ea870e (patch)
tree6dc3dc40d908ae9aa7b26f9b238f6930bfc55123
parent95d4eda7d22acadd20603d5102ca58e55f5c75f3 (diff)
Partially fix the problems in dependency analysis in configure.pl. It doesn't
handle recursive dependencies, so explicitly disabling, say, ecc_key, doesn't disable cvc as it should. However it does fix the problem of building with --with-tr1=none, which was the main problem people were having WRT to this.
-rwxr-xr-xconfigure.pl30
1 files changed, 17 insertions, 13 deletions
diff --git a/configure.pl b/configure.pl
index 1d100fb6a..d623c16e1 100755
--- a/configure.pl
+++ b/configure.pl
@@ -40,10 +40,6 @@ my $TRACING = 0;
##################################################
my $config = {};
-print STDERR "* WARNING\n" .
- "* $0 is deprecated; consider trying configure.py instead\n" .
- "* If it works, great. If not, file a bug and continue using $0\n*\n";
-
main();
exit;
@@ -60,12 +56,18 @@ sub exec_uname {
return '';
}
+sub deprecation_warning {
+ warning("$0 is deprecated; migration to ./configure.py strongly recommended");
+}
+
##################################################
# Main Driver #
##################################################
sub main {
my $base_dir = where_am_i();
+ deprecation_warning();
+
$$config{'uname'} = exec_uname();
$$config{'base-dir'} = $base_dir;
@@ -201,6 +203,8 @@ sub main {
generate_makefile($config);
copy_include_files($config);
+
+ deprecation_warning();
}
sub where_am_i {
@@ -508,8 +512,6 @@ sub module_runs_on {
sub scan_modules {
my ($config) = @_;
- my %dep_mods = ();
-
foreach my $mod (sort keys %MODULES) {
my %modinfo = %{ $MODULES{$mod} };
@@ -520,7 +522,8 @@ sub scan_modules {
if($modinfo{'load_on'} eq 'auto' or
($modinfo{'load_on'} eq 'asm_ok' and $$config{'asm_ok'})) {
- $$config{'modules'}{$mod} = 1;
+ my %maybe_load = ();
+ my $all_deps_found = 1;
LINE: foreach (@{$modinfo{'requires'}}) {
for my $req_mod (split(/\|/, $_)) {
@@ -529,18 +532,19 @@ sub scan_modules {
next if(defined($$config{'modules'}{$req_mod}) && $$config{'modules'}{$req_mod} < 0);
next unless(module_runs_on($config, $MODULES{$req_mod}, $req_mod, 0));
- $dep_mods{$req_mod} = 1;
+ $maybe_load{$req_mod} = 1;
next LINE;
}
+ $all_deps_found = 0;
}
- next;
+ if($all_deps_found) {
+ foreach my $depmod (keys %maybe_load)
+ { $$config{'modules'}{$depmod} = 1; }
+ $$config{'modules'}{$mod} = 1;
+ }
}
}
-
- foreach my $mod (sort keys %dep_mods) {
- $$config{'modules'}{$mod} = 1;
- }
}
sub print_enabled_modules {