diff options
author | Thomas Martitz <kugel@rockbox.org> | 2013-03-16 22:30:46 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2013-03-16 22:30:46 +0100 |
commit | 0d5883d07a5da22b058cd8deaa054a9afd7210e3 (patch) | |
tree | ca63f00c6e1a5b2d358702abf995be3ef75586f1 | |
parent | d22094044333f623b765fe943fa0c557fd1f5392 (diff) | |
download | rockbox-0d5883d07a5da22b058cd8deaa054a9afd7210e3.tar.gz rockbox-0d5883d07a5da22b058cd8deaa054a9afd7210e3.zip |
autoconf.pl: Add support for build folders with screen resolution (e.g. build-android-320x480).
Change-Id: If2ab767f44db604177a0028e86100633631ca8b8
-rwxr-xr-x | tools/autoconf.pl | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/tools/autoconf.pl b/tools/autoconf.pl index 24efc5aaf3..e7ba3e20f2 100755 --- a/tools/autoconf.pl +++ b/tools/autoconf.pl | |||
@@ -30,7 +30,7 @@ my @dirs = split(/\//, $builddir); | |||
30 | my $test = pop(@dirs); | 30 | my $test = pop(@dirs); |
31 | 31 | ||
32 | sub doconfigure { | 32 | sub doconfigure { |
33 | my ($target, $type) = @_; | 33 | my ($target, $type, $width, $height) = @_; |
34 | if (!exists($builds{$target})) { | 34 | if (!exists($builds{$target})) { |
35 | for $key (keys(%builds)) { | 35 | for $key (keys(%builds)) { |
36 | if ($key =~ $target) { | 36 | if ($key =~ $target) { |
@@ -40,9 +40,23 @@ sub doconfigure { | |||
40 | } | 40 | } |
41 | } | 41 | } |
42 | $command = "${srcdir}/configure --type=${type} --target=${target}"; | 42 | $command = "${srcdir}/configure --type=${type} --target=${target}"; |
43 | if (defined $width) { | ||
44 | $command .= " --lcdwidth=${width}"; | ||
45 | } | ||
46 | if (defined $height) { | ||
47 | $command .= " --lcdheight=${height}"; | ||
48 | } | ||
43 | %typenames = ("n" => "Normal", "s" => "Simulator", "b" => "Bootloader" ); | 49 | %typenames = ("n" => "Normal", "s" => "Simulator", "b" => "Bootloader" ); |
44 | unless (@ARGV[0] eq "-y") { | 50 | unless (@ARGV[0] eq "-y") { |
45 | print "Rockbox autoconf: \n\tTarget: $target \n\tType: $typenames{$type} \nCorrect? [Y/n] "; | 51 | $prompt = "Rockbox autoconf: \n\tTarget: $target \n\tType: $typenames{$type} \n"; |
52 | if (defined $width) { | ||
53 | $prompt .= "\tLCD width: $width\n"; | ||
54 | } | ||
55 | if (defined $height) { | ||
56 | $prompt .= "\tLCD height: $height\n"; | ||
57 | } | ||
58 | print $prompt . "Correct? [Y/n] "; | ||
59 | |||
46 | chomp($response = <>); | 60 | chomp($response = <>); |
47 | if ($response eq "") { | 61 | if ($response eq "") { |
48 | $response = "y"; | 62 | $response = "y"; |
@@ -69,7 +83,15 @@ sub buildtype { | |||
69 | return $build; | 83 | return $build; |
70 | } | 84 | } |
71 | 85 | ||
72 | if ($test =~ /(.*)-(.*)/) | 86 | if ($test =~ /(.*)-(.*)-([0-9]+)x([0-9]+)/) |
87 | { | ||
88 | if (buildtype($2)) { | ||
89 | doconfigure($1, buildtype($2), $3, $4); | ||
90 | } elsif (buildtype($1)) { | ||
91 | doconfigure($2, buildtype($1), $3, $4); | ||
92 | } | ||
93 | } | ||
94 | elsif ($test =~ /(.*)-(.*)/) | ||
73 | { | 95 | { |
74 | if (buildtype($2)) { | 96 | if (buildtype($2)) { |
75 | doconfigure($1, buildtype($2)); | 97 | doconfigure($1, buildtype($2)); |