From 51f914fb30a0540b9d2e51223e60dba744321882 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 6 Sep 2008 09:12:21 +0000 Subject: [PATCH] Bootstrap performs all steps up to executing builer now. Builder sends error code on failure now. --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402496 --- tools/buildbot/bootstrap.pl | 34 ++++++++++++++++++++++++++++++++++ tools/builder/Main.cs | 1 + 2 files changed, 35 insertions(+) diff --git a/tools/buildbot/bootstrap.pl b/tools/buildbot/bootstrap.pl index 0e13afbf..83761afa 100755 --- a/tools/buildbot/bootstrap.pl +++ b/tools/buildbot/bootstrap.pl @@ -23,3 +23,37 @@ else die "Unable to build builder tool!\n" unless -e 'builder.exe'; +#Go back to main source dir. +chdir(Build::PathFormat('../..')); + +#Get the source path. +my ($root) = getcwd(); + +#Create output folder if it doesn't exist. +if (!(-d 'OUTPUT')) { + mkdir('OUTPUT') or die("Failed to create output folder: $!\n"); +} + +#Write the configuration file. +open(CONF, '>build.cfg') or die("Failed to write build.cfg: $!\n"); +print CONF "OutputBase = " . Build::PathFormat($root . '/OUTPUT') . "\n"; +print CONF "SourceBase = $root\n"; +if ($^O eq "linux") +{ + print CONF "BuilderPath = /usr/bin/make\n"; +} +else +{ + print CONF "BuilderPath = " . $ENV{'MSVC8'} . "\n"; +} +close(CONF); + +#Do the annoying revision bumping. +#Linux needs some help here. +if ($^O eq "linux") +{ + Build::Command("flip -u modules.versions"); + Build::Command("flip -u tools/versionchanger.pl"); + Build::Command("chmod +x tools/versionchanger.pl"); +} +Build::Command("tools/versionchanger.pl"); diff --git a/tools/builder/Main.cs b/tools/builder/Main.cs index e4aa6452..0568c51e 100644 --- a/tools/builder/Main.cs +++ b/tools/builder/Main.cs @@ -44,6 +44,7 @@ namespace builder catch (System.Exception e) { Console.WriteLine("Build failed: " + e.Message); + Environment.Exit(1); } } }