diff options
author | bbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-04-21 22:54:32 +0000 |
---|---|---|
committer | bbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-04-21 22:54:32 +0000 |
commit | 878ddf1fc3540a715f63594ed22b6929e881afb4 (patch) | |
tree | c56c44dac138137b510e1fba7c3efe5e4d84bea2 /Tools/Source/SurfaceArea | |
download | edk2-878ddf1fc3540a715f63594ed22b6929e881afb4.zip edk2-878ddf1fc3540a715f63594ed22b6929e881afb4.tar.gz edk2-878ddf1fc3540a715f63594ed22b6929e881afb4.tar.bz2 |
Initial import.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Source/SurfaceArea')
-rw-r--r-- | Tools/Source/SurfaceArea/build.xml | 203 |
1 files changed, 203 insertions, 0 deletions
diff --git a/Tools/Source/SurfaceArea/build.xml b/Tools/Source/SurfaceArea/build.xml new file mode 100644 index 0000000..415958a --- /dev/null +++ b/Tools/Source/SurfaceArea/build.xml @@ -0,0 +1,203 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+-->
+<project default="all" basedir="." name="SurfaceArea">
+ <taskdef resource="net/sf/antcontrib/antlib.xml"/>
+ <property environment="env" />
+ <property name="WORKSPACE" value="${env.WORKSPACE}"/>
+ <taskdef resource="net/sf/antcontrib/antlib.xml"/>
+
+ <path id="classpath">
+ <fileset dir="${WORKSPACE}/Tools/Jars">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${WORKSPACE}/Tools/bin/xmlbeans/lib">
+ <include name="*.jar"/>
+ </fileset>
+ <pathelement path = "${env.CLASSPATH}"/>
+ </path>
+
+ <target name="init">
+ <uptodate targetfile="${WORKSPACE}/Tools/Jars/SurfaceArea.jar" property="jar.newer">
+ <srcfiles dir="${WORKSPACE}/Tools/XMLSchema" includes="*.xsd"/>
+ </uptodate>
+ </target>
+
+ <!--
+ Generate SurfaceArea.jar and source code
+ -->
+ <target name="SurfaceArea.jar" depends="init">
+ <java classname="org.apache.xmlbeans.impl.tool.SchemaCompiler">
+ <classpath refid="classpath"/>
+ <arg value="-javasource"/>
+ <arg value="1.5"/>
+ <arg value="-dl"/>
+ <arg value="-out"/>
+ <arg value="${WORKSPACE}/Tools/Jars/SurfaceArea.jar"/>
+ <arg value="${WORKSPACE}/Tools/XMLSchema/SurfaceArea.xsd"/>
+ <arg value="${WORKSPACE}/Tools/XMLSchema/FDPManifest.xsd"/>
+ <arg value="${WORKSPACE}/Tools/XMLSchema/SurfaceArea.xsdconfig"/>
+ </java>
+ </target>
+
+ <target name="SurfaceArea.java" depends="init">
+ <antcall target="SurfaceArea.java.clean"/>
+ <java classname="org.apache.xmlbeans.impl.tool.SchemaCompiler">
+ <classpath refid="classpath"/>
+ <arg value="-javasource"/>
+ <arg value="1.5"/>
+ <arg value="-dl"/>
+ <arg value="-srconly"/>
+ <arg value="-src"/>
+ <arg value="${WORKSPACE}/Tools/Source/SurfaceArea"/>
+ <arg value="${WORKSPACE}/Tools/XMLSchema/SurfaceArea.xsd"/>
+ <arg value="${WORKSPACE}/Tools/XMLSchema/FDPManifest.xsd"/>
+ <arg value="${WORKSPACE}/Tools/XMLSchema/SurfaceArea.xsdconfig"/>
+ </java>
+ </target>
+
+ <target name="SurfaceArea" depends="init" unless="jar.newer">
+ <antcall target="SurfaceArea.java.clean"/>
+ <java classname="org.apache.xmlbeans.impl.tool.SchemaCompiler">
+ <classpath refid="classpath"/>
+ <arg value="-javasource"/>
+ <arg value="1.5"/>
+ <arg value="-dl"/>
+ <arg value="-src"/>
+ <arg value="${WORKSPACE}/Tools/Source/SurfaceArea"/>
+ <arg value="-out"/>
+ <arg value="${WORKSPACE}/Tools/Jars/SurfaceArea.jar"/>
+ <arg value="${WORKSPACE}/Tools/XMLSchema/SurfaceArea.xsd"/>
+ <arg value="${WORKSPACE}/Tools/XMLSchema/FDPManifest.xsd"/>
+ <arg value="${WORKSPACE}/Tools/XMLSchema/SurfaceArea.xsdconfig"/>
+ </java>
+ </target>
+
+ <target name="SurfaceArea.java.clean">
+ <delete includeemptydirs="true">
+ <fileset dir="${WORKSPACE}/Tools/Source/SurfaceArea" includes="**/*" excludes="build.xml"/>
+ </delete>
+ </target>
+
+ <target name="SurfaceArea.jar.clean">
+ </target>
+
+ <!--
+ Surface Area Description file validation
+ -->
+ <target name="validate">
+ <echo message="Validating ... ${SURFACE_AREA_FILE}"/>
+ <!--
+ java -classpath %cp% org.apache.xmlbeans.impl.tool.InstanceValidator %*
+ -->
+ <copy file="${SURFACE_AREA_FILE}" tofile="${SURFACE_AREA_FILE}.xml"/>
+ <java classname="org.apache.xmlbeans.impl.tool.InstanceValidator"
+ outputproperty="XMLBEANS_OUTPUT" >
+
+ <classpath refid="classpath"/>
+ <arg value="-dl"/>
+ <arg value="${WORKSPACE}/Tools/XMLSchema/SurfaceArea.xsd"/>
+ <arg value="${SURFACE_AREA_FILE}.xml"/>
+
+ </java>
+
+ <delete file="${SURFACE_AREA_FILE}.xml" quiet="true"/>
+ <echo message="Result ... ${XMLBEANS_OUTPUT}"/>
+ </target>
+
+ <!--
+ beautify xml file
+ -->
+ <target name="pretty">
+ <echo message="Beautify ... ${SURFACE_AREA_FILE}"/>
+ <!--
+ java -classpath %cp% org.apache.xmlbeans.impl.tool.PrettyPrinter %*
+ -->
+ <java classname="org.apache.xmlbeans.impl.tool.PrettyPrinter"
+ errorproperty="XMLBEANS_OUTPUT"
+ output="${SURFACE_AREA_FILE}">
+
+ <classpath refid="classpath"/>
+ <arg value="-indent"/>
+ <arg value="2"/>
+ <arg value="${SURFACE_AREA_FILE}"/>
+
+ </java>
+
+ <if>
+ <equals arg1="${XMLBEANS_OUTPUT}" arg2=""/>
+ <then>
+ <echo message="Result ... DONE"/>
+ </then>
+ <else>
+ <echo message="Result ... ${XMLBEANS_OUTPUT}"/>
+ </else>
+ </if>
+ </target>
+
+ <!--
+ generate Surface Area template file from schema
+ -->
+ <target name="generate">
+ <echo message="Generating ... ${SURFACE_AREA_FILE}"/>
+ <!--
+ java -classpath %cp% org.apache.xmlbeans.impl.xsd2inst.SchemaInstanceGenerator %*
+ -->
+ <java classname="org.apache.xmlbeans.impl.xsd2inst.SchemaInstanceGenerator" fork="true"
+ errorproperty="XMLBEANS_OUTPUT"
+ output="${SURFACE_AREA_FILE}.tmp">
+
+ <classpath refid="classpath"/>
+ <arg value="-dl"/>
+ <arg value="${WORKSPACE}/Tools/XMLSchema/SurfaceArea.xsd"/>
+ <arg value="-name"/>
+ <arg value="${SURFACE_AREA_ELEMENT}"/>
+
+ </java>
+
+ <concat destfile="${SURFACE_AREA_FILE}">
+ <header trimleading="yes" filtering="no"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>]]>
+ </header>
+ <fileset file="${SURFACE_AREA_FILE}.tmp"/>
+ </concat>
+
+ <delete file="${SURFACE_AREA_FILE}.tmp" deleteonexit="true" quiet="true"/>
+ <if>
+ <equals arg1="${XMLBEANS_OUTPUT}" arg2=""/>
+ <then>
+ <echo message="Result ... DONE"/>
+ </then>
+ <else>
+ <echo message="Result ... ${XMLBEANS_OUTPUT}"/>
+ </else>
+ </if>
+ </target>
+
+ <target name="clean" depends="SurfaceArea.java.clean">
+ </target>
+
+ <target name="cleanall" depends="SurfaceArea.jar.clean">
+ <if>
+ <available file="${WORKSPACE}/Tools/Jars/SurfaceArea.jar"/>
+ <then>
+ <echo message="You must manually remove the file: ${WORKSPACE}/Tools/Jars/SurfaceArea.jar"/>
+ <echo message="Java has already loaded the file, and cannot remove it within ANT!"/>
+ </then>
+ </if>
+ </target>
+
+ <target name="all" depends="SurfaceArea">
+ </target>
+
+ <target name="install" depends="SurfaceArea.jar">
+ </target>
+
+</project>
|