-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jakefile
84 lines (72 loc) · 2.52 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
/*
* Jakefile
* iTunesTabView
*
* Copyright (C) 2010 Antoine Mercadal <[email protected]>
* 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 ("iTunesTabView", function(task)
{
task.setBuildIntermediatesPath(FILE.join("Build", "iTunesTabView.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("iTunesTabView");
task.setIdentifier("org.archipelproject.itunestabview");
task.setVersion("1.0");
task.setAuthor("Antoine Mercadal");
task.setEmail("antoine.mercadal @nospam@ inframonde.eu");
task.setSummary("iTunesTabView");
task.setSources(new FileList("*.j", "iTunesTabView/*.j"));
task.setResources(new FileList("Resources/*"));
task.setInfoPlistPath("Info.plist");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
else
task.setCompilerFlags("-O");
});
task("build", ["iTunesTabView"]);
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 iTunesTabView.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"]);