# HG changeset patch # User David Anderson # Date 1343519562 25200 # Node ID 1b0577b2683779a71c8bff7e168f48520c3946ff # Parent b0852a3c0ba76b7a629499da17350dd3f01894b1 Push build. diff -r b0852a3c0ba7 -r 1b0577b26837 tools/buildbot/bootstrap.pl --- a/tools/buildbot/bootstrap.pl Sat Jul 28 16:50:45 2012 -0700 +++ b/tools/buildbot/bootstrap.pl Sat Jul 28 16:52:42 2012 -0700 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# vim: set ts=2 sw=2 tw=99 noet: +# vim: set ts=2 sw=2 tw=99 et: use strict; use Cwd; @@ -21,88 +21,88 @@ #Create output folder if it doesn't exist. if (!(-d 'OUTPUT')) { - $reconf = 1; + $reconf = 1; } else { - if (-f 'OUTPUT/sentinel') { - my @s = stat('OUTPUT/sentinel'); - my $mtime = $s[9]; - my @files = ('build/pushbuild.txt', - 'build/AMBuildScript', - 'build/product.version', - 'build/tools/bootstrap.pl'); - my ($i); - for ($i = 0; $i <= $#files; $i++) { - if (IsNewer($files[$i], $mtime)) { - $reconf = 1; - last; - } - } - } else { - $reconf = 1; - } + if (-f 'OUTPUT/sentinel') { + my @s = stat('OUTPUT/sentinel'); + my $mtime = $s[9]; + my @files = ('build/pushbuild.txt', + 'build/AMBuildScript', + 'build/product.version', + 'build/tools/bootstrap.pl'); + my ($i); + for ($i = 0; $i <= $#files; $i++) { + if (IsNewer($files[$i], $mtime)) { + $reconf = 1; + last; + } + } + } else { + $reconf = 1; + } } if ($reconf) { - rmtree('OUTPUT'); - mkdir('OUTPUT') or die("Failed to create output folder: $!\n"); - chdir('OUTPUT'); + rmtree('OUTPUT'); + mkdir('OUTPUT') or die("Failed to create output folder: $!\n"); + chdir('OUTPUT'); - print "Attempting to reconfigure...\n"; + print "Attempting to reconfigure...\n"; - my ($os, $bits, $mode); - $os = $ARGV[0]; - $bits = $ARGV[1]; - $mode = $ARGV[2]; + my ($os, $bits, $mode); + $os = $ARGV[0]; + $bits = $ARGV[1]; + $mode = $ARGV[2]; - my ($prefix, $python); - if ($^O eq "darwin") { - $prefix = 'CC=clang CXX=clang++ '; - $python = 'python3'; - } elsif ($^O eq "linux") { - $prefix = 'CC="ccache gcc" CXX="ccache g++" '; - $python = 'python3'; - } elsif ($^O =~ /MSWin/) { - $prefix = ''; - $python = "C:\\Python31\\Python.exe"; - } + my ($prefix, $python); + if ($^O eq "darwin") { + $prefix = 'CC=clang CXX=clang++ '; + $python = 'python3'; + } elsif ($^O eq "linux") { + $prefix = 'CC="ccache gcc" CXX="ccache g++" '; + $python = 'python3'; + } elsif ($^O =~ /MSWin/) { + $prefix = ''; + $python = "C:\\Python31\\Python.exe"; + } - my ($cmdstring); - $cmdstring = $prefix . - $python . ' ' . - Build::PathFormat('../build/configure.py') . ' '; + my ($cmdstring); + $cmdstring = $prefix . + $python . ' ' . + Build::PathFormat('../build/configure.py') . ' '; - if ($mode eq 'release') { - $cmdstring .= '--enable-optimize '; - } else { - $cmdstring .= '--enable-debug '; - } + if ($mode eq 'release') { + $cmdstring .= '--enable-optimize '; + } else { + $cmdstring .= '--enable-debug '; + } - if ($bits eq '32') { - $cmdstring .= '--arch=x86 '; - } else { - $cmdstring .= '--arch=x64 '; - } + if ($bits eq '32') { + $cmdstring .= '--arch=x86 '; + } else { + $cmdstring .= '--arch=x64 '; + } - my ($result); - print "-> $cmdstring\n"; - $result = `$cmdstring`; + my ($result); + print "-> $cmdstring\n"; + $result = `$cmdstring`; - print "$result\n"; - if ($? != 0) { - die("Could not configure: $!\n"); - } - open(FILE, '>sentinel'); - print FILE "this is nothing.\n"; - close(FILE); + print "$result\n"; + if ($? != 0) { + die("Could not configure: $!\n"); + } + open(FILE, '>sentinel'); + print FILE "this is nothing.\n"; + close(FILE); } sub IsNewer { - my ($file, $time) = (@_); + my ($file, $time) = (@_); - my @s = stat($file); - my $mtime = $s[9]; - return $mtime > $time; + my @s = stat($file); + my $mtime = $s[9]; + return $mtime > $time; } exit(0);