Files
cappuccino/Tools/NativeHost/Jakefile
T

43 lines
1.1 KiB
JavaScript

require("../../common.jake");
var OS = require("os");
var task = require("jake").task
var stream = require("narwhal/term").stream;
task ("build", function()
{
if (executableExists("xcodebuild"))
{
if (OS.popen("xcodebuild -version").stdout.read().match("Xcode 4.0"))
stream.print("\0red(Building NativeHost was skipped due to your Xcode 4.0 pre-release not including the Mac OS X 10.5 SDK.\0)");
else
{
if (OS.system("xcodebuild -alltargets -configuration Release"))
OS.exit(1);
rm_rf(FILE.join($BUILD_CJS_CAPPUCCINO, "support", "NativeHost.app"));
FILE.mkdirs(FILE.join($BUILD_CJS_CAPPUCCINO, "support"))
cp_r(FILE.join("build", "Release", "NativeHost.app"), FILE.join($BUILD_CJS_CAPPUCCINO, "support", "NativeHost.app"));
}
}
else
{
print("Building NativeHost requires Xcode.");
}
});
task ("clean", function()
{
if (OS.system("xcodebuild clean"))
OS.exit(1);
});
task ("clobber", function()
{
if (OS.system("xcodebuild clean"))
OS.exit(1);
});
task ("default", ["build"]);