Push build.
Push build.
1.1 --- a/tools/buildbot/bootstrap.pl Sat Jul 28 16:50:45 2012 -0700
1.2 +++ b/tools/buildbot/bootstrap.pl Sat Jul 28 16:52:42 2012 -0700
1.3 @@ -1,5 +1,5 @@
1.4 #!/usr/bin/perl
1.5 -# vim: set ts=2 sw=2 tw=99 noet:
1.6 +# vim: set ts=2 sw=2 tw=99 et:
1.7
1.8 use strict;
1.9 use Cwd;
1.10 @@ -21,88 +21,88 @@
1.11
1.12 #Create output folder if it doesn't exist.
1.13 if (!(-d 'OUTPUT')) {
1.14 - $reconf = 1;
1.15 + $reconf = 1;
1.16 } else {
1.17 - if (-f 'OUTPUT/sentinel') {
1.18 - my @s = stat('OUTPUT/sentinel');
1.19 - my $mtime = $s[9];
1.20 - my @files = ('build/pushbuild.txt',
1.21 - 'build/AMBuildScript',
1.22 - 'build/product.version',
1.23 - 'build/tools/bootstrap.pl');
1.24 - my ($i);
1.25 - for ($i = 0; $i <= $#files; $i++) {
1.26 - if (IsNewer($files[$i], $mtime)) {
1.27 - $reconf = 1;
1.28 - last;
1.29 - }
1.30 - }
1.31 - } else {
1.32 - $reconf = 1;
1.33 - }
1.34 + if (-f 'OUTPUT/sentinel') {
1.35 + my @s = stat('OUTPUT/sentinel');
1.36 + my $mtime = $s[9];
1.37 + my @files = ('build/pushbuild.txt',
1.38 + 'build/AMBuildScript',
1.39 + 'build/product.version',
1.40 + 'build/tools/bootstrap.pl');
1.41 + my ($i);
1.42 + for ($i = 0; $i <= $#files; $i++) {
1.43 + if (IsNewer($files[$i], $mtime)) {
1.44 + $reconf = 1;
1.45 + last;
1.46 + }
1.47 + }
1.48 + } else {
1.49 + $reconf = 1;
1.50 + }
1.51 }
1.52
1.53 if ($reconf) {
1.54 - rmtree('OUTPUT');
1.55 - mkdir('OUTPUT') or die("Failed to create output folder: $!\n");
1.56 - chdir('OUTPUT');
1.57 + rmtree('OUTPUT');
1.58 + mkdir('OUTPUT') or die("Failed to create output folder: $!\n");
1.59 + chdir('OUTPUT');
1.60
1.61 - print "Attempting to reconfigure...\n";
1.62 + print "Attempting to reconfigure...\n";
1.63
1.64 - my ($os, $bits, $mode);
1.65 - $os = $ARGV[0];
1.66 - $bits = $ARGV[1];
1.67 - $mode = $ARGV[2];
1.68 + my ($os, $bits, $mode);
1.69 + $os = $ARGV[0];
1.70 + $bits = $ARGV[1];
1.71 + $mode = $ARGV[2];
1.72
1.73 - my ($prefix, $python);
1.74 - if ($^O eq "darwin") {
1.75 - $prefix = 'CC=clang CXX=clang++ ';
1.76 - $python = 'python3';
1.77 - } elsif ($^O eq "linux") {
1.78 - $prefix = 'CC="ccache gcc" CXX="ccache g++" ';
1.79 - $python = 'python3';
1.80 - } elsif ($^O =~ /MSWin/) {
1.81 - $prefix = '';
1.82 - $python = "C:\\Python31\\Python.exe";
1.83 - }
1.84 + my ($prefix, $python);
1.85 + if ($^O eq "darwin") {
1.86 + $prefix = 'CC=clang CXX=clang++ ';
1.87 + $python = 'python3';
1.88 + } elsif ($^O eq "linux") {
1.89 + $prefix = 'CC="ccache gcc" CXX="ccache g++" ';
1.90 + $python = 'python3';
1.91 + } elsif ($^O =~ /MSWin/) {
1.92 + $prefix = '';
1.93 + $python = "C:\\Python31\\Python.exe";
1.94 + }
1.95
1.96 - my ($cmdstring);
1.97 - $cmdstring = $prefix .
1.98 - $python . ' ' .
1.99 - Build::PathFormat('../build/configure.py') . ' ';
1.100 + my ($cmdstring);
1.101 + $cmdstring = $prefix .
1.102 + $python . ' ' .
1.103 + Build::PathFormat('../build/configure.py') . ' ';
1.104
1.105 - if ($mode eq 'release') {
1.106 - $cmdstring .= '--enable-optimize ';
1.107 - } else {
1.108 - $cmdstring .= '--enable-debug ';
1.109 - }
1.110 + if ($mode eq 'release') {
1.111 + $cmdstring .= '--enable-optimize ';
1.112 + } else {
1.113 + $cmdstring .= '--enable-debug ';
1.114 + }
1.115
1.116 - if ($bits eq '32') {
1.117 - $cmdstring .= '--arch=x86 ';
1.118 - } else {
1.119 - $cmdstring .= '--arch=x64 ';
1.120 - }
1.121 + if ($bits eq '32') {
1.122 + $cmdstring .= '--arch=x86 ';
1.123 + } else {
1.124 + $cmdstring .= '--arch=x64 ';
1.125 + }
1.126
1.127 - my ($result);
1.128 - print "-> $cmdstring\n";
1.129 - $result = `$cmdstring`;
1.130 + my ($result);
1.131 + print "-> $cmdstring\n";
1.132 + $result = `$cmdstring`;
1.133
1.134 - print "$result\n";
1.135 - if ($? != 0) {
1.136 - die("Could not configure: $!\n");
1.137 - }
1.138 - open(FILE, '>sentinel');
1.139 - print FILE "this is nothing.\n";
1.140 - close(FILE);
1.141 + print "$result\n";
1.142 + if ($? != 0) {
1.143 + die("Could not configure: $!\n");
1.144 + }
1.145 + open(FILE, '>sentinel');
1.146 + print FILE "this is nothing.\n";
1.147 + close(FILE);
1.148 }
1.149
1.150 sub IsNewer
1.151 {
1.152 - my ($file, $time) = (@_);
1.153 + my ($file, $time) = (@_);
1.154
1.155 - my @s = stat($file);
1.156 - my $mtime = $s[9];
1.157 - return $mtime > $time;
1.158 + my @s = stat($file);
1.159 + my $mtime = $s[9];
1.160 + return $mtime > $time;
1.161 }
1.162
1.163 exit(0);