Restructuring for better separation of Tool packages.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1674 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
38
Tools/Java/Source/SurfaceArea/SurfaceArea.msa
Normal file
38
Tools/Java/Source/SurfaceArea/SurfaceArea.msa
Normal file
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" >
|
||||
<MsaHeader>
|
||||
<ModuleName>Surface Area Build</ModuleName>
|
||||
<ModuleType>TOOL</ModuleType>
|
||||
<GuidValue>C21A4ED4-491E-4602-BF94-698EA54F254B</GuidValue>
|
||||
<Version>2.0</Version>
|
||||
<Abstract>This is the EFI/Tiano SurfaceArea Module</Abstract>
|
||||
<Description>
|
||||
This Module provides the EFI/Tiano Tools that are used to create EFI/Tiano
|
||||
Modules and Platform Binary Files (PBF)
|
||||
These tools require compilation only once if the Developer Workstation and
|
||||
the Developer's choice of HOST tool chain are stable. If the developer
|
||||
updates either the OS or the HOST tool chain, these tools should be rebuilt.
|
||||
</Description>
|
||||
<Copyright>Copyright 2006, Intel Corporation</Copyright>
|
||||
<License>
|
||||
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.
|
||||
</License>
|
||||
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
||||
</MsaHeader>
|
||||
<ModuleDefinitions>
|
||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||
<BinaryModule>false</BinaryModule>
|
||||
<OutputFileBasename>NULL</OutputFileBasename>
|
||||
</ModuleDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>build.xml</Filename>
|
||||
</SourceFiles>
|
||||
</ModuleSurfaceArea>
|
219
Tools/Java/Source/SurfaceArea/build.xml
Normal file
219
Tools/Java/Source/SurfaceArea/build.xml
Normal file
@ -0,0 +1,219 @@
|
||||
<?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="${env.XMLBEANS_HOME}/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/FarManifest.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/FarManifest.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" fork="true">
|
||||
<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/FarManifest.xsd"/>
|
||||
<arg value="${WORKSPACE}/Tools/XMLSchema/SurfaceArea.xsdconfig"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="SurfaceArea.java.clean">
|
||||
<delete includeemptydirs="true" failonerror="false">
|
||||
<fileset dir="${WORKSPACE}/Tools/Source/SurfaceArea/org" includes="**/*"/>
|
||||
</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"
|
||||
errorproperty="XMLBEANS_ERROR">
|
||||
|
||||
<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"/>
|
||||
<if>
|
||||
<or>
|
||||
<contains string="${XMLBEANS_OUTPUT}" substring="NOT valid"/>
|
||||
<contains string="${XMLBEANS_OUTPUT}" substring=": error:"/>
|
||||
<contains string="${XMLBEANS_ERROR}" substring="XmlException"/>
|
||||
<contains string="${XMLBEANS_ERROR}" substring=": error:"/>
|
||||
</or>
|
||||
<then>
|
||||
<echo message="Result ... ${XMLBEANS_OUTPUT}
${XMLBEANS_ERROR}"/>
|
||||
<fail message="${SURFACE_AREA_FILE} is invalid!"/>
|
||||
</then>
|
||||
<else>
|
||||
<echo message="Result ... ${SURFACE_AREA_FILE} is valid"/>
|
||||
</else>
|
||||
</if>
|
||||
</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">
|
||||
<delete file="${WORKSPACE}/Tools/Jars/SurfaceArea.jar"/>
|
||||
<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>
|
Reference in New Issue
Block a user