-
Notifications
You must be signed in to change notification settings - Fork 7
/
Jakefile
85 lines (73 loc) · 2.58 KB
/
Jakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
* Jakefile
*
* Copyright (C) 2010 Antoine Mercadal <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
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["CONFIGURATION"] || "Release";
framework ("GrowlCappuccino", function(task)
{
task.setBuildIntermediatesPath(FILE.join("Build", "GrowlCappuccino.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("GrowlCappuccino");
task.setIdentifier("org.archipelproject.growlcappuccino");
task.setVersion("1.0");
task.setAuthor("Antoine Mercadal");
task.setEmail("antoine.mercadal @nospam@ inframonde.eu");
task.setSummary("GrowlCappuccino");
task.setSources(new FileList("*.j", "GrowlCappuccino/*.j"));
task.setResources(new FileList("Resources/*"));
task.setInfoPlistPath("Info.plist");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
else
task.setCompilerFlags("-O");
});
task("build", ["GrowlCappuccino"]);
task("debug", function()
{
ENV["CONFIGURATION"] = "Debug"
JAKE.subjake(["."], "build", ENV);
});
task("release", function()
{
ENV["CONFIGURATION"] = "Release"
JAKE.subjake(["."], "build", ENV);
});
task ("documentation", function()
{
OS.system("doxygen GrowlCappuccino.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"]);