Sync changes from SourceMod's bootstrap script.
This commit is contained in:
parent
f69a8e66c6
commit
db001a6eb5
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
# vim: set ts=2 sw=2 tw=99 noet:
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Cwd;
|
use Cwd;
|
||||||
|
@ -10,7 +11,7 @@ chdir($path);
|
||||||
|
|
||||||
require 'helpers.pm';
|
require 'helpers.pm';
|
||||||
|
|
||||||
#Go to main source dir
|
#Go back above build dir
|
||||||
chdir(Build::PathFormat('../../..'));
|
chdir(Build::PathFormat('../../..'));
|
||||||
|
|
||||||
#Get the source path.
|
#Get the source path.
|
||||||
|
@ -21,24 +22,24 @@ my $reconf = 0;
|
||||||
if (!(-f 'OUTPUT/.ambuild2/graph') || !(-f 'OUTPUT/.ambuild2/vars')) {
|
if (!(-f 'OUTPUT/.ambuild2/graph') || !(-f 'OUTPUT/.ambuild2/vars')) {
|
||||||
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');
|
}
|
||||||
my ($result, $argn);
|
chdir('OUTPUT');
|
||||||
$argn = $#ARGV + 1;
|
my ($result, $argn);
|
||||||
print "Attempting to reconfigure...\n";
|
$argn = $#ARGV + 1;
|
||||||
my $conf_args = '--enable-optimize --no-color --symbol-files';
|
print "Attempting to reconfigure...\n";
|
||||||
if ($argn > 0 && $^O !~ /MSWin/) {
|
my $conf_args = '--enable-optimize --no-color --symbol-files';
|
||||||
|
if ($argn > 0 && $^O !~ /MSWin/) {
|
||||||
$result = `CC=$ARGV[0] CXX=$ARGV[0] python ../build/configure.py $conf_args`;
|
$result = `CC=$ARGV[0] CXX=$ARGV[0] python ../build/configure.py $conf_args`;
|
||||||
} else {
|
} else {
|
||||||
if ($^O =~ /MSWin/) {
|
if ($^O =~ /MSWin/) {
|
||||||
$result = `C:\\Python27\\Python.exe ..\\build\\configure.py $conf_args`;
|
$result = `C:\\Python27\\Python.exe ..\\build\\configure.py $conf_args`;
|
||||||
} else {
|
} else {
|
||||||
$result = `CC=clang CXX=clang python ../build/configure.py $conf_args`;
|
$result = `CC=clang CXX=clang python ../build/configure.py $conf_args`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "$result\n";
|
print "$result\n";
|
||||||
if ($? != 0) {
|
if ($? != 0) {
|
||||||
die("Could not configure: $!\n");
|
die("Could not configure: $!\n");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub IsNewer
|
sub IsNewer
|
||||||
|
@ -53,4 +54,3 @@ sub IsNewer
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user