PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/Foundation/Jakefile

http://github.com/cacaodev/cappuccino
#! | 68 lines | 57 code | 11 blank | 0 comment | 0 complexity | 92e3b80ffa7dbee89584eb0c7576e916 MD5 | raw file
 1/*
 2 * Jakefile
 3 * Foundation
 4 *
 5 * Created by Francisco Tolmasky.
 6 * Copyright 2009, 280 North, Inc.
 7 *
 8 * This library is free software; you can redistribute it and/or
 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23require("../common.jake");
24
25var framework = require("objective-j/jake").framework;
26var BundleTask = require("objective-j/jake").BundleTask;
27
28foundationTask = framework ("Foundation", function(foundationTask)
29{
30    foundationTask.setBuildIntermediatesPath(FILE.join($BUILD_DIR, "Foundation.build", $CONFIGURATION))
31    foundationTask.setBuildPath($BUILD_CONFIGURATION_DIR);
32
33    foundationTask.setAuthor("280 North, Inc.");
34    foundationTask.setEmail("feedback @nospam@ 280north.com");
35    foundationTask.setSummary("Foundation classes for Cappuccino");
36    foundationTask.setIdentifier("com.280n.Foundation");
37    foundationTask.setVersion(getCappuccinoVersion());
38    foundationTask.setLicense(BundleTask.License.LGPL_v2_1);
39    foundationTask.setSources(new FileList("**/*.j"));
40    foundationTask.setResources(new FileList("Resources/**/*"));
41    foundationTask.setFlattensSources(true);
42    foundationTask.setInfoPlistPath("Info.plist");
43    foundationTask.setEnvironments(require("objective-j/jake/environment").ObjJ);
44
45    // Grab all the .h's and just include them in each file.
46    var INCLUDES = new FileList("**/*.h").map(function(aFilename)
47    {
48        return "--include \"" + aFilename + "\"";
49    }).join(" ");
50
51    INCLUDES = "--include \"../AppKit/Platform/Platform.h\" " + INCLUDES;
52
53    if ($CONFIGURATION === "Release")
54        foundationTask.setCompilerFlags("-O " + INCLUDES);
55    else
56        foundationTask.setCompilerFlags("-DDEBUG -g " + INCLUDES);
57});
58
59$BUILD_CJS_FOUNDATION = FILE.join($BUILD_CJS_CAPPUCCINO_FRAMEWORKS, "Foundation");
60
61filedir ($BUILD_CJS_FOUNDATION, ["Foundation"], function()
62{
63    cp_r(foundationTask.buildProductPath(), $BUILD_CJS_FOUNDATION);
64});
65
66task ("build", ["Foundation", $BUILD_CJS_FOUNDATION]);
67
68CLOBBER.include($BUILD_CJS_FOUNDATION);