summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/autoconf.pl36
1 files changed, 21 insertions, 15 deletions
diff --git a/tools/autoconf.pl b/tools/autoconf.pl
index 3dae96502f..24efc5aaf3 100755
--- a/tools/autoconf.pl
+++ b/tools/autoconf.pl
@@ -41,15 +41,17 @@ sub doconfigure {
41 } 41 }
42 $command = "${srcdir}/configure --type=${type} --target=${target}"; 42 $command = "${srcdir}/configure --type=${type} --target=${target}";
43 %typenames = ("n" => "Normal", "s" => "Simulator", "b" => "Bootloader" ); 43 %typenames = ("n" => "Normal", "s" => "Simulator", "b" => "Bootloader" );
44 print "Rockbox autoconf: \n\tTarget: $target \n\tType: $typenames{$type} \nCorrect? [Y/n] "; 44 unless (@ARGV[0] eq "-y") {
45 chomp($response = <>); 45 print "Rockbox autoconf: \n\tTarget: $target \n\tType: $typenames{$type} \nCorrect? [Y/n] ";
46 if ($response eq "") { 46 chomp($response = <>);
47 $response = "y"; 47 if ($response eq "") {
48 } 48 $response = "y";
49 if ($response ne "y" && $response ne "Y") { 49 }
50 print "autoconf: Aborting\n"; 50 if ($response ne "y" && $response ne "Y") {
51 exit(0); 51 print "autoconf: Aborting\n";
52 } 52 exit(0);
53 }
54 }
53 system($command); 55 system($command);
54} 56}
55 57
@@ -59,18 +61,22 @@ sub buildtype {
59 $build = "s"; 61 $build = "s";
60 } elsif ($text eq "boot") { 62 } elsif ($text eq "boot") {
61 $build = "b"; 63 $build = "b";
62 } else { 64 } elsif ($text eq "build") {
63 $build = "n"; 65 $build = "n";
64 } 66 } else {
67 $build = "";
68 }
65 return $build; 69 return $build;
66} 70}
67 71
68if ($test =~ /(.*)-(.*)/) 72if ($test =~ /(.*)-(.*)/)
69{ 73{
70 $target = $1; 74 if (buildtype($2)) {
71 $build = buildtype($2); 75 doconfigure($1, buildtype($2));
72 doconfigure($target, $build); 76 } elsif (buildtype($1)) {
73} 77 doconfigure($2, buildtype($1));
78 }
79}
74elsif ($test =~ /(.*)/) 80elsif ($test =~ /(.*)/)
75{ 81{
76 $target = $1; 82 $target = $1;