Switch buildbot scripts to AMBuild 2 (bug 5997 part 15, r=ds).
This commit is contained in:
parent
b69b0de234
commit
a55b000273
@ -19,27 +19,7 @@ our ($root) = getcwd();
|
|||||||
|
|
||||||
my $reconf = 0;
|
my $reconf = 0;
|
||||||
|
|
||||||
#Create output folder if it doesn't exist.
|
if (!(-f 'OUTPUT/.ambuild2/graph') || !(-f 'OUTPUT/.ambuild2/vars')) {
|
||||||
if (!(-d 'OUTPUT')) {
|
|
||||||
$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');
|
|
||||||
my ($i);
|
|
||||||
for ($i = 0; $i <= $#files; $i++) {
|
|
||||||
if (IsNewer($files[$i], $mtime)) {
|
|
||||||
$reconf = 1;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$reconf = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($reconf) {
|
|
||||||
rmtree('OUTPUT');
|
rmtree('OUTPUT');
|
||||||
mkdir('OUTPUT') or die("Failed to create output folder: $!\n");
|
mkdir('OUTPUT') or die("Failed to create output folder: $!\n");
|
||||||
chdir('OUTPUT');
|
chdir('OUTPUT');
|
||||||
@ -47,21 +27,18 @@ if ($reconf) {
|
|||||||
$argn = $#ARGV + 1;
|
$argn = $#ARGV + 1;
|
||||||
print "Attempting to reconfigure...\n";
|
print "Attempting to reconfigure...\n";
|
||||||
if ($argn > 0 && $^O !~ /MSWin/) {
|
if ($argn > 0 && $^O !~ /MSWin/) {
|
||||||
$result = `CC=$ARGV[0] CXX=$ARGV[0] python3 ../build/configure.py --enable-optimize`;
|
$result = `CC=$ARGV[0] CXX=$ARGV[0] python ../build/configure.py --enable-optimize`;
|
||||||
} else {
|
} else {
|
||||||
if ($^O =~ /MSWin/) {
|
if ($^O =~ /MSWin/) {
|
||||||
$result = `C:\\Python32\\Python.exe ..\\build\\configure.py --enable-optimize`;
|
$result = `C:\\Python27\\Python.exe ..\\build\\configure.py --enable-optimize`;
|
||||||
} else {
|
} else {
|
||||||
$result = `CC=clang CXX=clang python3 ../build/configure.py --enable-optimize`;
|
$result = `CC=clang CXX=clang python ../build/configure.py --enable-optimize`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "$result\n";
|
print "$result\n";
|
||||||
if ($? != 0) {
|
if ($? != 0) {
|
||||||
die("Could not configure: $!\n");
|
die("Could not configure: $!\n");
|
||||||
}
|
}
|
||||||
open(FILE, '>sentinel');
|
|
||||||
print FILE "this is nothing.\n";
|
|
||||||
close(FILE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub IsNewer
|
sub IsNewer
|
||||||
|
@ -10,12 +10,14 @@ require 'helpers.pm';
|
|||||||
|
|
||||||
chdir('../../../OUTPUT');
|
chdir('../../../OUTPUT');
|
||||||
|
|
||||||
if ($^O eq "linux" || $^O eq "darwin") {
|
my $argn = $#ARGV + 1;
|
||||||
system("python3 build.py 2>&1");
|
if ($argn > 0) {
|
||||||
} else {
|
$ENV{CC} = $ARGV[0];
|
||||||
system("C:\\Python31\\python.exe build.py 2>&1");
|
$ENV{CXX} = $ARGV[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
system("ambuild --no-color 2>&1");
|
||||||
|
|
||||||
if ($? != 0)
|
if ($? != 0)
|
||||||
{
|
{
|
||||||
die "Build failed: $!\n";
|
die "Build failed: $!\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user