From db001a6eb5512a4eb59e7ff7d3c5622dcfa27044 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Sat, 17 May 2014 16:37:12 -0500 Subject: [PATCH] Sync changes from SourceMod's bootstrap script. --- support/buildbot/bootstrap.pl | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/support/buildbot/bootstrap.pl b/support/buildbot/bootstrap.pl index e2374225..37273792 100755 --- a/support/buildbot/bootstrap.pl +++ b/support/buildbot/bootstrap.pl @@ -1,4 +1,5 @@ #!/usr/bin/perl +# vim: set ts=2 sw=2 tw=99 noet: use strict; use Cwd; @@ -10,7 +11,7 @@ chdir($path); require 'helpers.pm'; -#Go to main source dir +#Go back above build dir chdir(Build::PathFormat('../../..')); #Get the source path. @@ -21,25 +22,25 @@ my $reconf = 0; if (!(-f 'OUTPUT/.ambuild2/graph') || !(-f 'OUTPUT/.ambuild2/vars')) { rmtree('OUTPUT'); mkdir('OUTPUT') or die("Failed to create output folder: $!\n"); - chdir('OUTPUT'); - my ($result, $argn); - $argn = $#ARGV + 1; - print "Attempting to reconfigure...\n"; - 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`; +} +chdir('OUTPUT'); +my ($result, $argn); +$argn = $#ARGV + 1; +print "Attempting to reconfigure...\n"; +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`; +} else { + if ($^O =~ /MSWin/) { + $result = `C:\\Python27\\Python.exe ..\\build\\configure.py $conf_args`; } else { - if ($^O =~ /MSWin/) { - $result = `C:\\Python27\\Python.exe ..\\build\\configure.py $conf_args`; - } else { - $result = `CC=clang CXX=clang python ../build/configure.py $conf_args`; - } - } - print "$result\n"; - if ($? != 0) { - die("Could not configure: $!\n"); + $result = `CC=clang CXX=clang python ../build/configure.py $conf_args`; } } +print "$result\n"; +if ($? != 0) { + die("Could not configure: $!\n"); +} sub IsNewer { @@ -53,4 +54,3 @@ sub IsNewer exit(0); -