You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2016/04/22 19:24:52 UTC
[05/35] git commit: [flex-falcon]
[refs/heads/feature/maven-migration-test] - initial attempt at compiler build
after maven refactor. Attempted to remove the flex-sdk ties
initial attempt at compiler build after maven refactor. Attempted to remove the flex-sdk ties
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/ec64c4d4
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/ec64c4d4
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/ec64c4d4
Branch: refs/heads/feature/maven-migration-test
Commit: ec64c4d48a89aa31b2d97742d57e9a0004a10699
Parents: 1cda5c4
Author: Alex Harui <ah...@apache.org>
Authored: Tue Apr 19 13:21:51 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Apr 22 09:02:56 2016 -0700
----------------------------------------------------------------------
compiler/build.xml | 711 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 711 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ec64c4d4/compiler/build.xml
----------------------------------------------------------------------
diff --git a/compiler/build.xml b/compiler/build.xml
new file mode 100644
index 0000000..8948167
--- /dev/null
+++ b/compiler/build.xml
@@ -0,0 +1,711 @@
+<?xml version="1.0" ?>
+
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<project name="compiler" default="main" basedir=".">
+
+ <!--
+
+ PROPERTIES
+
+ -->
+
+ <!-- The 'compiler' property is the absolute path, with forward slashes, -->
+ <!-- to the 'compiler' directory that contains this file. -->
+ <!-- All input paths are expressed as absolute paths starting with ${compiler}. -->
+ <pathconvert property="compiler" dirsep="/">
+ <path location="${basedir}"/>
+ </pathconvert>
+
+ <!-- The 'env' property contains all the environment variables -->
+ <property environment="env"/>
+
+ <!-- Properties can be overridden locally by loading a local.properties file -->
+ <!-- Java 8 users probably need javadoc.params=-Xdoclint:none -->
+ <property file="${compiler}/local.properties"/>
+ <property name="javadoc.params" value="" />
+
+ <!-- The 'sdk' property is the absolute path, with forward slashes, to the compiler/generated/dist/sdk directory -->
+ <!-- where a Falcon SDK is built -->
+ <!-- All output paths are expressed as absolute paths starting with ${sdk} -->
+ <property name="sdk" value="${compiler}/generated/dist/sdk"/>
+
+ <property name="src.depend" value="true"/>
+
+ <!-- Options for <javac> tasks -->
+ <property name="javac.debug" value="true"/>
+ <property name="javac.deprecation" value="false"/>
+ <property name="javac.src" value="1.6"/>
+
+ <!-- JAR manifest entries -->
+ <property name="manifest.sealed" value="false"/>
+ <property name="manifest.Implementation-Title" value="Apache Flex Compiler"/>
+ <property name="manifest.Implementation-Version" value="${release.version}"/>
+ <property name="manifest.Implementation-Vendor" value="Apache Software Foundation"/>
+
+ <property name="compiler.ant.binaries" value="org/apache/flex/compiler/ant/**/*.class"/>
+ <property name="compiler.font.binaries" value="org/apache/flex/fonts/**"/>
+
+ <!-- label is set by CruiseControl script based on P4 label incrementer -->
+ <condition property="build.number" value="${label}">
+ <isset property="label"/>
+ </condition>
+
+ <!--
+
+ CLASSPATHS
+
+ -->
+
+ <path id="classpath">
+ <fileset dir="${compiler}/lib" includes="**/*.jar"/>
+ </path>
+
+ <!--
+
+ MACROS
+
+ -->
+
+ <!--
+ Defines a <jflex input="..." skeleton="..." output="..."> macro
+ for using JFlex to generate a Java-based lexer from a .lex file.
+ -->
+ <macrodef name="jflex">
+ <attribute name="input"/>
+ <attribute name="skeleton" default="${compiler}/src/org/apache/flex/compiler/internal/parsing/as/skeleton.default"/>
+ <attribute name="output"/>
+ <sequential>
+ <java jar="${compiler}/lib/JFlex.jar" fork="true">
+ <arg value="-d"/>
+ <arg value="@{output}"/>
+ <arg value="-q"/>
+ <arg value="@{input}"/>
+ <arg value="--skel"/>
+ <arg value="@{skeleton}"/>
+ </java>
+ </sequential>
+ </macrodef>
+
+ <!--
+ Defines an <antlr2 input="..." output="..."> macro
+ for using ANTLR 2 to generate a Java-based parser from a .g file.
+ -->
+ <macrodef name="antlr2">
+ <attribute name="input"/>
+ <attribute name="output"/>
+ <sequential>
+ <mkdir dir="@{output}"/>
+ <dirname property="antlr2.dirname.@{input}" file="@{input}"/>
+ <antlr target="@{input}" outputdirectory="@{output}" dir="${antlr2.dirname.@{input}}">
+ <classpath>
+ <pathelement path="${compiler}/lib/antlr.jar"/>
+ </classpath>
+ </antlr>
+ </sequential>
+ </macrodef>
+
+ <!--
+ Defines an <antlr3 input="..." output="..."> macro
+ for using ANTLR 3 to generate a Java-based parser from a .g file.
+ -->
+ <macrodef name="antlr3">
+ <attribute name="input"/>
+ <attribute name="output"/>
+ <sequential>
+ <mkdir dir="@{output}"/>
+ <!-- Call antlr3 on command-line because we can't update Ant library path. -->
+ <java jar="${compiler}/lib/antlr.jar" fork="yes" failonerror="yes">
+ <arg value="@{input}"/>
+ <arg value="-o"/>
+ <arg value="@{output}"/>
+ </java>
+ </sequential>
+ </macrodef>
+
+ <!--
+ Defines a <jburg input="..." output="..."> macro
+ for using JBurg to generate a Java-based BURM from a .jbg file.
+ -->
+ <macrodef name="jburg">
+ <attribute name="input"/>
+ <attribute name="output"/>
+ <sequential>
+ <dirname property="jburg.dirname.@{input}" file="@{input}"/>
+ <dirname property="jburg.dirname.@{output}" file="@{output}"/>
+ <basename property="jburg.basename.@{output}" file="@{output}"/>
+ <mkdir dir="${jburg.dirname.@{output}}"/>
+ <java classname="jburg.burg.JBurgMain"
+ classpath="${compiler}/generated/classes"
+ fork="true" failonerror="true"
+ dir="${jburg.dirname.@{input}}">
+ <arg value="@{input}"/>
+ <arg value="-outputdir"/>
+ <arg value="${jburg.dirname.@{output}}"/>
+ <arg value="-outputfile"/>
+ <arg value="${jburg.basename.@{output}}"/>
+ <arg value="-g"/>
+ <classpath>
+ <pathelement path="${compiler}/generated/classes"/>
+ <pathelement path="${compiler}/lib/antlr.jar"/>
+ <pathelement path="${compiler}/lib/jburg.jar"/>
+ </classpath>
+ </java>
+ </sequential>
+ </macrodef>
+
+ <!--
+ Defines an <annotate.class file="..." annotation="..."> macro
+ used for inserting @SuppressWarnings(...) into generated Java classes,
+ in order to keep the build warning-free.
+ ANTLR and JBurg generate code that isn't warning-free in Eclipse.
+ -->
+ <macrodef name="annotate.class">
+ <attribute name="file"/>
+ <attribute name="annotation"/>
+ <sequential>
+ <java classname="org.apache.flex.compiler.tools.annotate.AnnotateClass" output="@{file}" fork="false">
+ <classpath>
+ <path refid="classpath"/>
+ <pathelement location="${compiler}/generated/classes"/>
+ </classpath>
+ <arg value="@{file}"/>
+ <arg value="@{annotation}"/>
+ </java>
+ </sequential>
+ </macrodef>
+
+ <!--
+
+ SETUP
+
+ -->
+
+ <target name="download" description="Downloads third-party JARs">
+ <ant antfile="${compiler}/downloads.xml" dir="${compiler}"/>
+ <delete dir="${compiler}/in"/>
+ </target>
+
+ <target name="setup" depends="download" description="Does prelimary build setup">
+ </target>
+
+ <!--
+
+ GENERATION OF JAVA CODE WITH JFLEX
+
+ -->
+
+ <target name="set.raw.as.tokenizer.uptodate">
+ <uptodate property="raw.as.tokenizer.uptodate"
+ targetfile="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/as/RawASTokenizer.java">
+ <srcfiles dir="${compiler}/src/org/apache/flex/compiler/internal/parsing/as">
+ <include name="RawASTokenizer.lex"/>
+ <include name="skeleton.falcon"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="raw.as.tokenizer" depends="set.raw.as.tokenizer.uptodate" unless="raw.as.tokenizer.uptodate"
+ description="Generates RawASTokenizer.java">
+ <echo message="Generating RawASTokenizer"/>
+ <jflex input="${compiler}/src/org/apache/flex/compiler/internal/parsing/as/RawASTokenizer.lex"
+ skeleton="${compiler}/src/org/apache/flex/compiler/internal/parsing/as/skeleton.falcon"
+ output="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/as"/>
+ </target>
+
+ <target name="set.raw.asdoc.tokenizer.uptodate">
+ <uptodate property="raw.asdoc.tokenizer.uptodate"
+ targetfile="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/as/RawASDocTokenizer.java">
+ <srcfiles dir="${compiler}/src/org/apache/flex/compiler/internal/parsing/as">
+ <include name="RawASDocTokenizer.lex"/>
+ <include name="skeleton.default"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="raw.asdoc.tokenizer" depends="set.raw.asdoc.tokenizer.uptodate" unless="raw.asdoc.tokenizer.uptodate"
+ description="Generates RawASDocTokenizer.java">
+ <echo message="Generating RawASDocTokenizer"/>
+ <jflex input="${compiler}/src/org/apache/flex/compiler/internal/parsing/as/RawASDocTokenizer.lex"
+ output="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/as"/>
+ </target>
+
+ <target name="set.raw.mxml.tokenizer.uptodate">
+ <uptodate property="raw.mxml.tokenizer.uptodate"
+ targetfile="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/mxml/RawMXMLTokenizer.java">
+ <srcfiles dir="${compiler}/src/org/apache/flex/compiler/internal/parsing/mxml">
+ <include name="RawMXMLTokenizer.lex"/>
+ <include name="skeleton.default"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="raw.mxml.tokenizer" depends="set.raw.mxml.tokenizer.uptodate" unless="raw.mxml.tokenizer.uptodate"
+ description="Generates RawMXMLTokenizer.java">
+ <echo message="Generating RawMXMLTokenizer"/>
+ <jflex input="${compiler}/src/org/apache/flex/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex"
+ output="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/mxml"/>
+ </target>
+
+ <target name="jflex" depends="raw.as.tokenizer, raw.asdoc.tokenizer, raw.mxml.tokenizer"
+ description="Generates Java code with JFlex"/>
+
+ <!--
+
+ GENERATION OF JAVA CODE WITH ANTLR
+
+ -->
+
+ <target name="set.as.parser.uptodate">
+ <uptodate property="as.parser.uptodate"
+ srcfile="${compiler}/src/org/apache/flex/compiler/internal/parsing/as/ASParser.g"
+ targetfile="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/as/ASParser.java"/>
+ </target>
+
+ <target name="as.parser" depends="annotate.class, set.as.parser.uptodate" unless="as.parser.uptodate">
+ <echo message="Generating ASParser and ASTokenTypes"/>
+ <antlr2 input="${compiler}/src/org/apache/flex/compiler/internal/parsing/as/ASParser.g"
+ output="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/as"/>
+ <annotate.class file="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/as/ASParser.java"
+ annotation='@SuppressWarnings("unused")'/>
+ <annotate.class file="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/as/ASTokenTypes.java"
+ annotation='@SuppressWarnings("unused")'/>
+ </target>
+
+ <target name="set.metadata.parser.uptodate">
+ <uptodate property="metadata.parser.uptodate"
+ targetfile="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/as/MetadataParser.java">
+ <srcfiles dir="${compiler}/src/org/apache/flex/compiler/internal/parsing/as">
+ <include name="MetadataParser.g"/>
+ <include name="ImportMetadataTokenTypes.txt"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="metadata.parser" depends="annotate.class, set.metadata.parser.uptodate" unless="metadata.parser.uptodate">
+ <echo message="Generating MetadataParser and MetadataTokenTypes"/>
+ <antlr2 input="${compiler}/src/org/apache/flex/compiler/internal/parsing/as/MetadataParser.g"
+ output="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/as"/>
+ <annotate.class file="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/as/MetadataParser.java"
+ annotation='@SuppressWarnings("all")'/>
+ <annotate.class file="${compiler}/generated/src/org/apache/flex/compiler/internal/parsing/as/MetadataTokenTypes.java"
+ annotation='@SuppressWarnings("unused")'/>
+ </target>
+
+ <target name="set.css.lexer.and.parser.uptodate">
+ <uptodate property="css.lexer.and.parser.uptodate"
+ srcfile="${compiler}/src/org/apache/flex/compiler/internal/css/CSS.g"
+ targetfile="${compiler}/generated/src/org/apache/flex/compiler/internal/css/CSSParser.java"/>
+ </target>
+
+ <target name="css.lexer.and.parser" depends="annotate.class, set.css.lexer.and.parser.uptodate" unless="css.lexer.and.parser.uptodate">
+ <echo message="Generating CSSLexer and CSSParser"/>
+ <antlr3 input="${compiler}/src/org/apache/flex/compiler/internal/css/CSS.g"
+ output="${compiler}/generated/src/org/apache/flex/compiler/internal/css"/>
+ <!--<annotate.class file="${compiler}/generated/src/org/apache/flex/compiler/internal/css/CSSLexer.java"
+ annotation='@SuppressWarnings("unused")'/>-->
+ <!--<annotate.class file="${compiler}/generated/src/org/apache/flex/compiler/internal/css/CSSParser.java"
+ annotation='@SuppressWarnings("unused")'/>-->
+ </target>
+
+ <target name="set.css.tree.uptodate">
+ <uptodate property="css.tree.uptodate"
+ srcfile="${compiler}/src/org/apache/flex/compiler/internal/css/CSSTree.g"
+ targetfile="${compiler}/generated/src/org/apache/flex/compiler/internal/css/CSSTree.java"/>
+ </target>
+
+ <target name="css.tree" depends="annotate.class, set.css.tree.uptodate" unless="css.tree.uptodate">
+ <echo message="Generating CSSTree"/>
+ <antlr3 input="${compiler}/src/org/apache/flex/compiler/internal/css/CSSTree.g"
+ output="${compiler}/generated/src/org/apache/flex/compiler/internal/css"/>
+ <!--<annotate.class file="${compiler}/generated/src/org/apache/flex/compiler/internal/css/CSSTree.java"
+ annotation='@SuppressWarnings({"rawtypes", "unchecked", "unused"})'/>-->
+ </target>
+
+ <target name="antlr" depends="as.parser, metadata.parser, css.lexer.and.parser, css.tree"
+ description="Generates Java code with ANTLR"/>
+
+ <!--
+
+ GENERATION OF JAVA CODE WITH JBURG
+
+ -->
+
+ <target name="set.cmc.emitter.uptodate">
+ <uptodate property="cmc.emitter.uptodate"
+ targetfile="${compiler}/generated/src/org/apache/flex/compiler/internal/as/codegen/CmcEmitter.java">
+ <srcfiles dir="${compiler}/src/org/apache/flex/compiler/internal/as/codegen">
+ <include name="*.jbg"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="cmc.emitter" depends="annotate.class, node.adapter, unknown.tree.handler.patterns, set.cmc.emitter.uptodate" unless="cmc.emitter.uptodate">
+ <echo message="Generating CmcEmitter"/>
+ <jburg input="${compiler}/src/org/apache/flex/compiler/internal/as/codegen/cmc.jbg"
+ output="${compiler}/generated/src/org/apache/flex/compiler/internal/as/codegen/CmcEmitter.java"/>
+ <annotate.class file="${compiler}/generated/src/org/apache/flex/compiler/internal/as/codegen/CmcEmitter.java"
+ annotation='@SuppressWarnings({"rawtypes", "unchecked", "unused"})'/>
+ </target>
+
+ <target name="set.css.emitter.uptodate">
+ <uptodate property="css.emitter.uptodate"
+ targetfile="${compiler}/generated/src/org/apache/flex/compiler/internal/css/codegen/CSSEmitter.java">
+ <srcfiles dir="${compiler}/src/org/apache/flex/compiler/internal/css/codegen">
+ <include name="css.jbg"/>
+ <include name="CSSPatterns.jbg"/>
+ <include name="CSSRules.jbg"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="css.emitter" depends="annotate.class, set.css.emitter.uptodate" unless="css.emitter.uptodate">
+ <echo message="Generating CSSEmitter"/>
+ <jburg input="${compiler}/src/org/apache/flex/compiler/internal/css/codegen/css.jbg"
+ output="${compiler}/generated/src/org/apache/flex/compiler/internal/css/codegen/CSSEmitter.java"/>
+ <annotate.class file="${compiler}/generated/src/org/apache/flex/compiler/internal/css/codegen/CSSEmitter.java"
+ annotation='@SuppressWarnings({"rawtypes", "unchecked", "unused"})'/>
+ </target>
+
+ <target name="jburg" depends="cmc.emitter, css.emitter"
+ description="Generates Java code with JBurg"/>
+
+ <!--
+
+ ECLIPSE SETUP
+
+ -->
+
+ <target name="eclipse" depends="setup, jflex, antlr, jburg"
+ description="Prepares for building in Eclipse by generating Java code with JFlex, ANTLR, and JBurg"/>
+
+ <!--
+
+ JAVADOC
+
+ -->
+
+ <target name="set.javadoc.zip.uptodate">
+ <uptodate property="javadoc.zip.uptodate"
+ targetfile="${compiler}/generated/javadoc.zip">
+ <srcfiles dir="${compiler}/src">
+ <include name="**/*.java"/>
+ </srcfiles>
+ <srcfiles dir="${compiler}/generated/src">
+ <include name="**/*.java"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="javadoc" depends="eclipse, set.javadoc.zip.uptodate" unless="javadoc.zip.uptodate"
+ description="Builds Javadoc">
+ <javadoc destdir="${compiler}/generated/javadoc" useexternalfile="yes" overview="${compiler}/src/overview.html" failonerror="true" maxmemory="512m" additionalparam="${javadoc.params}">
+ <sourcefiles>
+ <fileset dir="${compiler}/src" includes="**/*.java"/>
+ <fileset dir="${compiler}/generated/src" includes="**/*.java"/>
+ </sourcefiles>
+ <classpath>
+ <path refid="classpath"/>
+ <pathelement location="${ant.core.lib}"/>
+ </classpath>
+ <tag name="note" description="Note:"/>
+ <tag name="post" description="Postcondition:"/>
+ <tag name="pre" description="Precondition:"/>
+ </javadoc>
+ <zip destfile="${compiler}/generated/javadoc.zip">
+ <zipfileset dir="${compiler}/generated/javadoc" prefix="javadoc"/>
+ </zip>
+ </target>
+
+ <!--
+
+ BUILDING
+
+ -->
+
+ <target name="src.depend" if="src.depend">
+ <depend srcdir="${compiler}/src;${compiler}/generated/src"
+ destdir="${compiler}/generated/classes" cache="${compiler}/generated/classes"/>
+ </target>
+
+ <target name="compile" depends="eclipse, src.depend" description="compile">
+ <javac debug="${javac.debug}" deprecation="${javac.deprecation}"
+ includes="**/*.java" destdir="${compiler}/generated/classes" classpathref="classpath" includeAntRuntime="true"
+ source="${javac.src}" target="${javac.src}">
+ <src path="${compiler}/src"/>
+ <src path="${compiler}/generated/src"/>
+ <compilerarg value="-Xlint:all,-path,-fallthrough,-cast"/>
+ </javac>
+ <copy todir="${compiler}/generated/classes">
+ <fileset dir="${compiler}/src" includes="**/*.properties"/>
+ </copy>
+ <!-- Copy the config file for the flex-tool-api. -->
+ <copy todir="${compiler}/generated/classes/META-INF/services"
+ file="src/META-INF/services/org.apache.flex.tools.FlexToolGroup"/>
+ </target>
+
+ <target name="set.messages.en.uptodate">
+ <uptodate property="messages.en.uptodate"
+ targetfile="${compiler}/generated/classes/org/apache/flex/compiler/messages_en.properties">
+ <srcfiles dir="${compiler}/generated/classes/org/apache/flex/compiler/problems">
+ <include name="*Problem.class"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="localization" depends="compile, problem.localizer, set.messages.en.uptodate" unless="messages.en.uptodate"
+ description="Creates message_en.properties file">
+ <echo message="Creating messages_en.properties file for compiler problem localization"/>
+ <java classname="org.apache.flex.compiler.tools.ProblemLocalizer" fork="true">
+ <classpath>
+ <pathelement location="${compiler}/generated/classes"/>
+ <fileset dir="${compiler}/lib" includes="**/*.jar"/>
+ </classpath>
+ <!-- arg0: location of directory to search for problem class files -->
+ <arg value="${compiler}/generated/classes/org/apache/flex/compiler/problems"/>
+ <!-- arg1: location of where to write messages_en.properties -->
+ <arg value="${compiler}/generated/classes/org/apache/flex/compiler"/>
+ </java>
+ </target>
+
+ <target name="version-info" unless="build.number">
+ <property name="build.number" value="0"/>
+ </target>
+
+ <target name="set.compiler.jar.uptodate">
+ <uptodate property="compiler.jar.uptodate"
+ targetfile="${sdk}/lib/compiler.jar">
+ <srcfiles dir="${compiler}/generated/classes">
+ <include name="**/*.class"/>
+ <include name="**/*.properties"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="compiler.jar" depends="compile, localization, version-info, set.compiler.jar.uptodate" unless="compiler.jar.uptodate"
+ description="Builds compiler.jar">
+ <mkdir dir="${sdk}/lib"/>
+ <copy file="${basedir}/../LICENSE.base" tofile="${compiler}/generated/classes/META-INF/LICENSE"/>
+ <copy file="${basedir}/../NOTICE.base" tofile="${compiler}/generated/classes/META-INF/NOTICE"/>
+ <jar file="${sdk}/lib/compiler.jar" basedir="${compiler}/generated/classes" includes="**/*.properties,org/apache/**/*,META-INF/**/*" excludes="${compiler.ant.binaries},${compiler.font.binaries}">
+ <include name="META-INF/LICENSE"/>
+ <include name="META-INF/NOTICE"/>
+ <manifest>
+ <attribute name="Sealed" value="${manifest.sealed}"/>
+ <attribute name="Implementation-Title" value="${manifest.Implementation-Title}"/>
+ <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
+ <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+ <attribute name="Class-Path" value="external/antlr.jar external/commons-cli.jar external/commons-io.jar external/guava.jar external/lzma-sdk.jar external/flex-tool-api.jar .."/>
+ <!-- The .. in the line above allows the compiler to load the env.properties file -->
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="set.falcon.asc.jar.uptodate">
+ <uptodate property="falcon.asc.jar.uptodate"
+ targetfile="${sdk}/lib/falcon-asc.jar">
+ <srcfiles dir="${compiler}/generated/classes">
+ <include name="**/*.class"/>
+ <include name="**/*.properties"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="falcon.asc.jar" depends="compiler.jar, set.falcon.asc.jar.uptodate" unless="falcon.asc.jar.uptodate">
+ <mkdir dir="${sdk}/lib"/>
+ <jar file="${sdk}/lib/falcon-asc.jar" basedir="${compiler}/generated/classes" whenmanifestonly="create">
+ <include name="META-INF/LICENSE"/>
+ <include name="META-INF/NOTICE"/>
+ <manifest>
+ <attribute name="Sealed" value="${manifest.sealed}"/>
+ <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - ASC Command Line Compiler"/>
+ <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
+ <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+ <attribute name="Main-Class" value="org.apache.flex.compiler.clients.ASC"/>
+ <attribute name="Class-Path" value="compiler.jar"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="set.falcon.mxmlc.jar.uptodate">
+ <uptodate property="falcon.mxmlc.jar.uptodate"
+ targetfile="${sdk}/lib/falcon-mxmlc.jar">
+ <srcfiles dir="${compiler}/generated/classes">
+ <include name="**/*.class"/>
+ <include name="**/*.properties"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="falcon.mxmlc.jar" depends="compiler.jar, set.falcon.mxmlc.jar.uptodate" unless="falcon.mxmlc.jar.uptodate">
+ <mkdir dir="${sdk}/lib"/>
+ <jar file="${sdk}/lib/falcon-mxmlc.jar" basedir="${compiler}/generated/classes" whenmanifestonly="create">
+ <include name="META-INF/LICENSE"/>
+ <include name="META-INF/NOTICE"/>
+ <manifest>
+ <attribute name="Sealed" value="${manifest.sealed}"/>
+ <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - MXMLC Command Line Compiler"/>
+ <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
+ <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+ <attribute name="Main-Class" value="org.apache.flex.compiler.clients.MXMLC"/>
+ <attribute name="Class-Path" value="compiler.jar"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="set.falcon.compc.jar.uptodate">
+ <uptodate property="falcon.compc.jar.uptodate"
+ targetfile="${sdk}/lib/falcon-compc.jar">
+ <srcfiles dir="${compiler}/generated/classes">
+ <include name="**/*.class"/>
+ <include name="**/*.properties"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="falcon.compc.jar" depends="compiler.jar, set.falcon.compc.jar.uptodate" unless="falcon.compc.jar.uptodate">
+ <mkdir dir="${sdk}/lib"/>
+ <jar file="${sdk}/lib/falcon-compc.jar" basedir="${compiler}/generated/classes" whenmanifestonly="create">
+ <include name="META-INF/LICENSE"/>
+ <include name="META-INF/NOTICE"/>
+ <manifest>
+ <attribute name="Sealed" value="${manifest.sealed}"/>
+ <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - COMPC Command Line Compiler"/>
+ <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
+ <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+ <attribute name="Main-Class" value="org.apache.flex.compiler.clients.COMPC"/>
+ <attribute name="Class-Path" value="compiler.jar"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="set.falcon.optimizer.jar.uptodate">
+ <uptodate property="falcon.optimizer.jar.uptodate"
+ targetfile="${sdk}/lib/falcon-optimizer.jar">
+ <srcfiles dir="${compiler}/generated/classes">
+ <include name="**/*.class"/>
+ <include name="**/*.properties"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="falcon.optimizer.jar" depends="compiler.jar, set.falcon.optimizer.jar.uptodate" unless="falcon.optimizer.jar.uptodate">
+ <mkdir dir="${sdk}/lib"/>
+ <jar file="${sdk}/lib/falcon-optimizer.jar" basedir="${compiler}/generated/classes" whenmanifestonly="create">
+ <include name="META-INF/LICENSE"/>
+ <include name="META-INF/NOTICE"/>
+ <manifest>
+ <attribute name="Sealed" value="${manifest.sealed}"/>
+ <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Apache SWF Optimizer"/>
+ <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
+ <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+ <attribute name="Main-Class" value="org.apache.flex.compiler.clients.Optimizer"/>
+ <attribute name="Class-Path" value="compiler.jar"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="set.falcon.swfdump.jar.uptodate">
+ <uptodate property="falcon.swfdump.jar.uptodate"
+ targetfile="${sdk}/lib/falcon-swfdump.jar">
+ <srcfiles dir="${compiler}/generated/classes">
+ <include name="**/*.class"/>
+ <include name="**/*.properties"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="falcon.swfdump.jar" depends="compiler.jar, set.falcon.swfdump.jar.uptodate" unless="falcon.swfdump.jar.uptodate">
+ <mkdir dir="${sdk}/lib"/>
+ <jar file="${sdk}/lib/falcon-swfdump.jar" basedir="${compiler}/generated/classes" whenmanifestonly="create">
+ <include name="META-INF/LICENSE"/>
+ <include name="META-INF/NOTICE"/>
+ <manifest>
+ <attribute name="Sealed" value="${manifest.sealed}"/>
+ <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - SWF Dump Command Line utility"/>
+ <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
+ <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+ <attribute name="Main-Class" value="org.apache.flex.swf.io.SWFDump"/>
+ <attribute name="Class-Path" value="compiler.jar commons-io.jar"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="set.falcon.flextasks.jar.uptodate">
+ <uptodate property="falcon.flextasks.jar.uptodate"
+ targetfile="${sdk}/lib/falcon-flextasks.jar">
+ <srcfiles dir="${compiler}/generated/classes">
+ <include name="**/*.class"/>
+ <include name="**/*.properties"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="falcon.flextasks.jar" depends="compiler.jar, set.falcon.flextasks.jar.uptodate" unless="falcon.flextasks.jar.uptodate">
+ <mkdir dir="${sdk}/lib"/>
+ <jar file="${sdk}/lib/falcon-flexTasks.jar" basedir="${compiler}/generated/classes" >
+ <include name="META-INF/LICENSE"/>
+ <include name="META-INF/NOTICE"/>
+ <manifest>
+ <attribute name="Sealed" value="${manifest.sealed}"/>
+ <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - ant Tasks"/>
+ <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
+ <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+ <attribute name="Class-Path" value="compiler.jar"/>
+ </manifest>
+ <fileset dir="${compiler}" includes="flexTasks.tasks"/>
+ <fileset dir="${compiler}/generated/classes" includes="${compiler.ant.binaries}"/>
+ </jar>
+ </target>
+
+ <target name="jar" depends="compiler.jar, falcon.asc.jar, falcon.mxmlc.jar, falcon.compc.jar, falcon.optimizer.jar, falcon.swfdump.jar, falcon.flextasks.jar"
+ description="Creates JAR files"/>
+
+ <!--
+
+ SDK
+
+ -->
+
+ <target name="sdk" depends="jar" description="Builds a Falcon SDK"/>
+
+ <target name="main" depends="sdk" description="Default target - Builds a Falcon SDK">
+ <tstamp>
+ <format property="build.datetime" pattern="MM/dd/yyyy hh:mm:ss aa"/>
+ </tstamp>
+ <echo>compiler main completed on ${build.datetime}</echo>
+ </target>
+
+ <!--
+
+ CLEANUP
+
+ -->
+
+ <target name="clean" description="clean">
+ <delete dir="${compiler}/generated"/>
+ </target>
+
+ <target name="wipe" depends="clean" description="Wipes everything that didn't come from Git.">
+ <delete dir="${compiler}/lib"/>
+ <delete dir="${compiler}/utils"/>
+ </target>
+
+ </project>