sm-ext-dhooks2/buildbot/bootstrap.pl

37 lines
791 B
Perl
Raw Normal View History

2013-09-01 17:11:38 +02:00
#!/usr/bin/perl
# vim: set ts=2 sw=2 tw=99 noet:
use strict;
use Cwd;
use File::Basename;
use File::Path;
my ($myself, $path) = fileparse($0);
chdir($path);
require 'helpers.pm';
#Go back above build dir
chdir(Build::PathFormat('../..'));
#Get the source path.
our ($root) = getcwd();
rmtree('OUTPUT');
mkdir('OUTPUT') or die("Failed to create output folder: $!\n");
chdir('OUTPUT');
my ($result);
#configure AMBuild
if ($^O eq "linux") {
2013-09-01 19:02:53 +02:00
$result = `CC=gcc CXX=gcc python3 ../build/configure.py --enable-optimize`;
2013-09-01 17:11:38 +02:00
} elsif ($^O eq "darwin") {
2013-09-01 19:02:53 +02:00
$result = `CC=clang CXX=clang python3 ../build/configure.py --enable-optimize`;
2013-09-01 17:11:38 +02:00
} else {
2013-09-01 19:02:53 +02:00
$result = `C:\\Python31\\Python.exe ..\\build\\configure.py --enable-optimize`;
2013-09-01 17:11:38 +02:00
}
print "$result\n";
if ($? != 0) {
die('Could not configure!');
}