Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
85 lines (72 sloc) 2.51 KB
/*
* Jakefile
* MessageBoard
*
* Copyright (C) 2010 Antoine Mercadal <antoine.mercadal@inframonde.eu>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var ENV = require("system").env,
FILE = require("file"),
OS = require("os"),
JAKE = require("jake"),
task = JAKE.task,
CLEAN = require("jake/clean").CLEAN,
FileList = JAKE.FileList,
framework = require("cappuccino/jake").framework,
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Release";
framework ("MessageBoard", function(task)
{
task.setBuildIntermediatesPath(FILE.join("Build", "MessageBoard.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("MessageBoard");
task.setIdentifier("org.archipelproject.messageboard");
task.setVersion("1.0");
task.setAuthor("Antoine Mercadal");
task.setEmail("antoine.mercadal @nospam@ inframonde.eu");
task.setSummary("MessageBoard");
task.setSources(new FileList("*.j", "MessageBoard/*.j"));
task.setResources(new FileList("Resources/*"));
task.setInfoPlistPath("Info.plist");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
else
task.setCompilerFlags("-O");
});
task("build", ["MessageBoard"]);
task("debug", function()
{
ENV["CONFIG"] = "Debug"
JAKE.subjake(["."], "build", ENV);
});
task("release", function()
{
ENV["CONFIG"] = "Release"
JAKE.subjake(["."], "build", ENV);
});
task ("documentation", function()
{
OS.system("doxygen MessageBoard.doxygen")
});
task("test", function()
{
var tests = new FileList('Test/*Test.j');
var cmd = ["ojtest"].concat(tests.items());
var cmdString = cmd.map(OS.enquote).join(" ");
var code = OS.system(cmdString);
if (code !== 0)
OS.exit(code);
});
task ("default", ["release"]);
task ("docs", ["documentation"]);
task ("all", ["release", "debug", "documentation"]);
Something went wrong with that request. Please try again.