add smarter defaults to XML build
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/7a6f9154 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7a6f9154 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7a6f9154 Branch: refs/heads/develop Commit: 7a6f91546e76d52e017e9c39a4d2665bb24b6b59 Parents: 41ac2e1 Author: Alex Harui <[email protected]> Authored: Sun Feb 14 22:11:43 2016 -0800 Committer: Alex Harui <[email protected]> Committed: Sun Feb 14 22:11:43 2016 -0800 ---------------------------------------------------------------------- frameworks/projects/XML/build.xml | 63 +++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7a6f9154/frameworks/projects/XML/build.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/XML/build.xml b/frameworks/projects/XML/build.xml index ec948ec..4d3f14e 100644 --- a/frameworks/projects/XML/build.xml +++ b/frameworks/projects/XML/build.xml @@ -26,14 +26,18 @@ <property environment="env"/> <property file="${FLEXJS_HOME}/build.properties"/> <property name="FLEX_HOME" value="${FLEXJS_HOME}"/> - <property name="FALCON_HOME" value="${env.FALCON_HOME}"/> - <property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/> - <property name="JS.SWC" value="${FALCONJX_HOME}/../externs/js/out/bin/js.swc" /> - <property name="GCL.SWC" value="${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc" /> - <property name="target.name" value="XML-${release.version}.swc" /> - <property name="target.name.no.version" value="XML.swc" /> - - <target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test-js" description="Full build of XML.swc"> + + <target name="more-props" > + <property name="JS.SWC" value="${FALCONJX_HOME}/../externs/js/out/bin/js.swc" /> + <property name="GCL.SWC" value="${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc" /> + <property name="target.name" value="XML-${release.version}.swc" /> + <property name="target.name.no.version" value="XML.swc" /> + <path id="lib.path"> + <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/> + </path> + </target> + + <target name="main" depends="clean,check-falcon-home,check-falconjx-home,more-props,compile-asjs,compile-extern-swc,copy-js,compile,test-js" description="Full build of XML.swc"> </target> <target name="test" unless="is.jenkins"> @@ -61,10 +65,6 @@ </delete> </target> - <path id="lib.path"> - <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/> - </path> - <target name="compile" description="Compiles .as files into .swc"> <echo message="Compiling libs/XML.swc"/> <echo message="FLEX_HOME: ${FLEX_HOME}"/> @@ -169,4 +169,43 @@ </copy> </target> + <target name="check-falcon-home" unless="FALCON_HOME" + description="Check FALCON_HOME is a directory."> + + <echo message="FALCON_HOME is ${env.FALCON_HOME}"/> + + <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" + type="file" + property="FALCON_HOME" + value="${env.FALCON_HOME}"/> + + <available file="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk/lib/falcon-mxmlc.jar" + type="file" + property="FALCON_HOME" + value="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk"/> + + <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler/generated/dist/sdk folder in flex-falcon repo or this folder if it has been converted into an FB-compatible SDK" + unless="FALCON_HOME"/> + </target> + + <target name="check-falconjx-home" unless="FALCONJX_HOME" + description="Check FALCON_HOME is a directory."> + + <echo message="FALCONJX_HOME is ${env.FALCONJX_HOME}"/> + + <available file="${env.FALCONJX_HOME}/lib/jsc.jar" + type="file" + property="FALCONJX_HOME" + value="${env.FALCONJX_HOME}"/> + + <available file="${FLEXJS_HOME}/../flex-falcon/compiler.jx/lib/jsc.jar" + type="file" + property="FALCONJX_HOME" + value="${FLEXJS_HOME}/../flex-falcon/compiler.jx"/> + + <fail message="FALCONJX_HOME must be set to a folder with a lib sub-folder containing jsc.jar such as the compiler.jx folder in flex-falcon repo or the js folder if it has been converted into an FB-compatible SDK" + unless="FALCONJX_HOME"/> + </target> + + </project>
