Re-Follow...
[mirror_edk2.git] / Tools / build.xml
1 <?xml version="1.0"?>
2 <!--
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 -->
12 <project name="Tools" default="all" basedir=".">
13
14 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
15 <property environment="env"/>
16
17 <target name="all" depends="C_Code">
18 <echo message="The EDK II Tools build has completed!"/>
19 </target>
20
21 <target name="C_Code" depends="JavaCode">
22 <subant target="" inheritall="false">
23 <filelist dir="."
24 files="
25 Source/TianoTools/build.xml
26 "/>
27 </subant>
28 </target>
29
30 <target name="JavaCode" depends="SurfaceArea">
31 <subant target="" verbose="true" inheritall="false">
32 <!-- Note: this is an ordered list. The projects have dependencies between them. -->
33 <filelist dir="."
34 files="
35 Source/Common/build.xml
36 Source/PcdTools/build.xml
37 Source/GenBuild/build.xml
38 Source/FrameworkTasks/build.xml
39 Source/Cpptasks/build.xml
40 Source/FrameworkWizard/build.xml
41 Source/MigrationTools/build.xml
42 "/>
43 </subant>
44 <echo message="The EDK II Java Tools build has completed!"/>
45 </target>
46
47 <target name="Wizard" depends="SurfaceArea">
48 <subant target="" verbose="true" inheritall="false">
49 <!-- Note: this is an ordered list. The projects have dependencies between them. -->
50 <filelist dir="."
51 files="
52 Source/FrameworkWizard/build.xml
53 "/>
54 </subant>
55 </target>
56
57 <target name="SurfaceArea" depends="makeCatalog">
58 <subant target="" verbose="true" inheritall="false">
59 <filelist dir="."
60 files="
61 Source/SurfaceArea/build.xml
62 "/>
63 </subant>
64 </target>
65
66 <target name="makeCatalog">
67 <echo file="XMLSchema/catalog.xml">
68 <![CDATA[<?xml version="1.0"?>
69 <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.xsd">
70 <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
71 <rewriteSystem systemIdStartString="http://www.TianoCore.org/2006/Edk2.0/"
72 rewritePrefix="file:/]]>${env.WORKSPACE}<![CDATA[/Tools/XMLSchema/"/>
73 <rewriteURI uriStartString="http://www.TianoCore.org/2006/Edk2.0/"
74 rewritePrefix="file:/]]>${env.WORKSPACE}<![CDATA[/Tools/XMLSchema/"/>
75 </catalog>]]>
76 </echo>
77 <copy file="Conf/tools_def.template" tofile="Conf/tools_def.txt" overwrite="false"/>
78 <copy file="Conf/target.template" tofile="Conf/target.txt" overwrite="false"/>
79 <if>
80 <not>
81 <available file="Conf/FrameworkDatabase.db"/>
82 </not>
83 <then>
84 <copy file="Conf/FrameworkDatabase.template" tofile="Conf/FrameworkDatabase.db"/>
85 </then>
86 </if>
87 </target>
88
89 <target name="clean">
90 <subant target="clean" inheritall="false">
91 <filelist dir="."
92 files="
93 Source/FrameworkWizard/build.xml
94 Source/Cpptasks/build.xml
95 Source/FrameworkTasks/build.xml
96 Source/GenBuild/build.xml
97 Source/PcdTools/build.xml
98 Source/Common/build.xml
99 Source/SurfaceArea/build.xml
100 Source/TianoTools/build.xml
101 Source/MigrationTools/build.xml
102 "/>
103 </subant>
104 </target>
105
106 <target name="cleanall">
107 <available classname="org.tianocore.frameworkwizard.FrameworkWizardUI" property="FrameworkWizardUI.available"/>
108 <available classname="org.tianocore.build.GenBuildTask" property="GenBuildTask.available"/>
109 <available classname="org.tianocore.framework.tasks.Tool" property="Tool.available"/>
110 <available classname="org.tianocore.pcd.action.BuildAction" property="PcdClass.available"/>
111 <if>
112 <or>
113 <isset property="FrameworkWizardUI.available"/>
114 <isset property="GenBuildTask.available"/>
115 <isset property="Tool.available"/>
116 <isset property="PcdClass.available"/>
117 </or>
118 <then>
119 <fail message="Use ant -noclasspath cleanall, to remove all jar files!"/>
120 </then>
121 </if>
122 <subant target="cleanall" inheritall="true">
123 <filelist dir="."
124 files="
125 Source/FrameworkWizard/build.xml
126 Source/Cpptasks/build.xml
127 Source/FrameworkTasks/build.xml
128 Source/GenBuild/build.xml
129 Source/PcdTools/build.xml
130 Source/Common/build.xml
131 Source/SurfaceArea/build.xml
132 Source/TianoTools/build.xml
133 Source/MigrationTools/build.xml
134 "/>
135 </subant>
136 </target>
137 </project>