mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-28 06:27:02 +00:00
138 lines
5.0 KiB
XML
138 lines
5.0 KiB
XML
<project name = "common">
|
|
|
|
<property environment = "env" />
|
|
|
|
<dirname property = "Checkout" file = "${ant.file.common}" />
|
|
|
|
<property name = "Configuration" value = "Release" />
|
|
|
|
<property name = "Build" location = "${env.STEAM_BUILD}" />
|
|
|
|
<property name = "Build.Cappuccino" location = "${Build}/Cappuccino" />
|
|
|
|
<property name = "Build.Cappuccino.Starter" location = "${Build}/Cappuccino/Starter" />
|
|
<property name = "Build.Cappuccino.Starter.Frameworks" location = "${Build.Cappuccino.Starter}/Frameworks" />
|
|
|
|
<property name = "Build.Cappuccino.Tools" location = "${Build}/Cappuccino/Tools" />
|
|
<property name = "Build.Cappuccino.Tools.Frameworks" location = "${Build.Cappuccino.Tools}/Frameworks" />
|
|
|
|
<property name = "Build.Cappuccino.Tools.Objj" location = "${Build.Cappuccino.Tools}/objj" />
|
|
|
|
<property name = "Build.Cappuccino.Tools.Bin" location = "${Build.Cappuccino.Tools}/objj/bin" />
|
|
<property name = "Build.Cappuccino.Tools.Lib" location = "${Build.Cappuccino.Tools}/objj/lib" />
|
|
<property name = "Build.Cappuccino.Tools.Lib.Frameworks" location = "${Build.Cappuccino.Tools}/objj/lib/Frameworks" />
|
|
<property name = "Build.Cappuccino.Tools.Lib.Frameworks-Rhino" location = "${Build.Cappuccino.Tools}/objj/lib/Frameworks-Rhino" />
|
|
|
|
<property name = "Build.Cappuccino.Tools.Editors" location = "${Build.Cappuccino.Tools}/Editors" />
|
|
|
|
<property name = "env.OBJJ_HOME" value = "/usr/local/share/objj" />
|
|
<property name = "env.OBJJ_LIB" value = "${env.OBJJ_HOME}/lib" />
|
|
|
|
<!-- allow bootstrapping: use installed js.jar if it's present, otherwise use local version -->
|
|
<condition property = "jsjar" value = "${env.OBJJ_LIB}/js.jar">
|
|
<and>
|
|
<available file = "${env.OBJJ_LIB}/js.jar" />
|
|
<!-- hack to prevent deprecation warnings for overwriting properties -->
|
|
<not><isset property = "jsjar" /></not>
|
|
</and>
|
|
</condition>
|
|
<property name = "jsjar" value = "${Checkout}/Tools/Utilities/js.jar" />
|
|
|
|
<!-- prepare-release -->
|
|
|
|
<target name = "prepare-release">
|
|
|
|
<mkdir dir = "${Build.Cappuccino}" />
|
|
|
|
<mkdir dir = "${Build.Cappuccino.Starter}" />
|
|
<mkdir dir = "${Build.Cappuccino.Starter.Frameworks}" />
|
|
|
|
<mkdir dir = "${Build.Cappuccino.Tools}" />
|
|
<!--<mkdir dir = "${Build.Cappuccino.Tools.Frameworks}" />-->
|
|
|
|
<mkdir dir = "${Build.Cappuccino.Tools.Objj}" />
|
|
<mkdir dir = "${Build.Cappuccino.Tools.Bin}" />
|
|
<mkdir dir = "${Build.Cappuccino.Tools.Lib}" />
|
|
|
|
<mkdir dir = "${Build.Cappuccino.Tools.Lib.Frameworks}" />
|
|
<mkdir dir = "${Build.Cappuccino.Tools.Lib.Frameworks-Rhino}" />
|
|
|
|
<mkdir dir = "${Build.Cappuccino.Tools.Editors}" />
|
|
|
|
</target>
|
|
|
|
<!-- Iterate -->
|
|
|
|
<macrodef name = "iterate">
|
|
|
|
<attribute name = "target"/>
|
|
<element name = "files" />
|
|
|
|
<sequential>
|
|
<subant target = "@{target}" inheritall = "false" inheritrefs = "false" >
|
|
<files/>
|
|
</subant>
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
<macrodef name = "iterate-build">
|
|
|
|
<attribute name = "target"/>
|
|
|
|
<sequential>
|
|
<subant target = "@{target}" inheritall = "false" inheritrefs = "false" >
|
|
<fileset dir = "." includes = "*/build.xml" />
|
|
</subant>
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
<!-- JavaScript Compiler -->
|
|
<macrodef name = "jsc">
|
|
|
|
<attribute name = "dir" default = "." />
|
|
|
|
<element name = "arguments"/>
|
|
|
|
<sequential>
|
|
<java classname = "org.mozilla.javascript.tools.jsc.Main" dir = "@{dir}" fork = "true">
|
|
<classpath>
|
|
<pathelement location = "${jsjar}" />
|
|
<pathelement location = "." />
|
|
</classpath>
|
|
|
|
<arguments/>
|
|
</java>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<!-- JavaScript "Preprocessor" -->
|
|
|
|
<macrodef name = "preprocess">
|
|
|
|
<attribute name = "file" />
|
|
<attribute name = "output"/>
|
|
<element name = "arguments" optional = "true" />
|
|
|
|
<sequential>
|
|
<exec executable = "gcc" output = "@{output}" error = "@{output}.err">
|
|
<!-- Preprocessing only -->
|
|
<arg value = "-E" />
|
|
<!-- Interpret files as C source files (instead of treating them as object files); this option is given to make the compiler preprocess them -->
|
|
<arg value = "-x" />
|
|
<arg value = "c" />
|
|
<!-- Don't generate #line directives (which would of course mess things up in HTML documents!) -->
|
|
<arg value = "-P" />
|
|
|
|
<arguments/>
|
|
|
|
<arg value = "@{file}" />
|
|
</exec>
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
|
|
</project>
|