Fix the CLASSPATH
[mirror_edk2.git] / Tools / build.xml
CommitLineData
878ddf1f 1<?xml version="1.0"?>\r
2<!--\r
3Copyright (c) 2006, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11-->\r
12<project name="Tools" default="all" basedir=".">\r
13\r
3c8842bc 14 <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
878ddf1f 15 <property environment="env"/>\r
16\r
c80da0c4 17 <target name="all" depends="C_Code">\r
18 <echo message="The EDK II Tools build has completed!"/>\r
19 </target>\r
a7828769 20\r
21 <target name="C_Code" depends="JavaCode">\r
22 <subant target="" inheritall="false">\r
23 <filelist dir="."\r
24 files="\r
ecb33821 25 CCode/Source/build.xml\r
a7828769 26 "/>\r
27 </subant>\r
28 </target>\r
29\r
878ddf1f 30 <target name="JavaCode" depends="SurfaceArea">\r
31 <subant target="" verbose="true" inheritall="false">\r
32 <!-- Note: this is an ordered list. The projects have dependencies between them. -->\r
33 <filelist dir="."\r
34 files="\r
feccee87 35 Java/Source/Common/build.xml\r
36 Java/Source/PcdTools/build.xml\r
37 Java/Source/GenBuild/build.xml\r
38 Java/Source/FrameworkTasks/build.xml\r
39 Java/Source/Cpptasks/build.xml\r
40 Java/Source/FrameworkWizard/build.xml\r
41 Java/Source/MigrationTools/build.xml\r
42 Java/Source/ContextTool/build.xml\r
43 Java/Source/Merge/build.xml\r
0062d29a 44 Java/Source/CheckTools/build.xml\r
ee80c4d0 45 "/>\r
878ddf1f 46 </subant>\r
c80da0c4 47 <echo message="The EDK II Java Tools build has completed!"/>\r
48 </target>\r
49\r
50 <target name="Wizard" depends="SurfaceArea">\r
51 <subant target="" verbose="true" inheritall="false">\r
52 <!-- Note: this is an ordered list. The projects have dependencies between them. -->\r
53 <filelist dir="."\r
54 files="\r
feccee87 55 Java/Source/FrameworkWizard/build.xml\r
c80da0c4 56 "/>\r
57 </subant>\r
878ddf1f 58 </target>\r
59\r
ee2db093 60 <target name="Merge" depends="SurfaceArea">\r
61 <subant target="" verbose="true" inheritall="false">\r
62 <filelist dir="."\r
63 files="\r
feccee87 64 Java/Source/Merge/build.xml\r
ee2db093 65 "/>\r
66 </subant>\r
67 </target>\r
68\r
878ddf1f 69 <target name="SurfaceArea" depends="makeCatalog">\r
70 <subant target="" verbose="true" inheritall="false">\r
71 <filelist dir="."\r
72 files="\r
feccee87 73 Java/Source/SurfaceArea/build.xml\r
878ddf1f 74 "/>\r
75 </subant>\r
76 </target>\r
77\r
878ddf1f 78 <target name="makeCatalog">\r
c7794830 79 <if>\r
80 <not>\r
81 <available file="XMLSchema/catalog.xml"/>\r
82 </not>\r
83 <then>\r
84 <echo file="XMLSchema/catalog.xml"><![CDATA[<?xml version="1.0"?>\r
878ddf1f 85<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.xsd">\r
86<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">\r
87 <rewriteSystem systemIdStartString="http://www.TianoCore.org/2006/Edk2.0/"\r
88 rewritePrefix="file:/]]>${env.WORKSPACE}<![CDATA[/Tools/XMLSchema/"/>\r
89 <rewriteURI uriStartString="http://www.TianoCore.org/2006/Edk2.0/"\r
90 rewritePrefix="file:/]]>${env.WORKSPACE}<![CDATA[/Tools/XMLSchema/"/>\r
91</catalog>]]>\r
c7794830 92</echo>\r
93 </then>\r
94 </if>\r
e5890ee5 95 <if>\r
96 <not>\r
97 <available file="Conf/tools_def.txt"/>\r
98 </not>\r
99 <then>\r
100 <copy file="Conf/tools_def.template" tofile="Conf/tools_def.txt"/>\r
101 </then>\r
102 </if>\r
103\r
104 <if>\r
105 <not>\r
106 <available file="Conf/target.txt"/>\r
107 </not>\r
108 <then>\r
109 <copy file="Conf/target.template" tofile="Conf/target.txt"/>\r
110 </then>\r
111 </if>\r
112\r
3c8842bc 113 <if>\r
114 <not>\r
115 <available file="Conf/FrameworkDatabase.db"/>\r
116 </not>\r
117 <then>\r
118 <copy file="Conf/FrameworkDatabase.template" tofile="Conf/FrameworkDatabase.db"/>\r
119 </then>\r
120 </if>\r
878ddf1f 121 </target>\r
2a8198da 122\r
2fcfed38 123 <target name="reconfig">\r
124 <!-- backup all config files -->\r
125 <if>\r
126 <available file="Conf/target.txt"/>\r
127 <then>\r
128 <echo message="Backup Conf/target.txt to Conf/target.txt.bak" />\r
129 <copy file="Conf/target.txt" tofile="Conf/target.txt.bak" overwrite="true" />\r
130 </then>\r
131 </if>\r
132 <if>\r
133 <available file="Conf/tools_def.txt"/>\r
134 <then>\r
135 <echo message="Backup Conf/tools_def.txt to Conf/tools_def.txt.bak" />\r
136 <copy file="Conf/tools_def.txt" tofile="Conf/tools_def.txt.bak" overwrite="true" />\r
137 </then>\r
138 </if>\r
139 <if>\r
140 <available file="Conf/FrameworkDatabase.db"/>\r
141 <then>\r
142 <echo message="Backup Conf/FrameworkDatabase.db to Conf/FrameworkDatabase.db.bak" />\r
143 <copy file="Conf/FrameworkDatabase.db" tofile="Conf/FrameworkDatabase.db.bak" overwrite="true" />\r
144 </then>\r
145 </if>\r
146 \r
147 <if>\r
148 <available file="Conf/tools_def.template"/>\r
149 <then>\r
150 <echo message="Copy file from Conf/tools_def.template to Conf/tools_def.txt" />\r
151 <copy file="Conf/tools_def.template" tofile="Conf/tools_def.txt" overwrite="true" />\r
152 </then>\r
153 </if>\r
154\r
155 <if>\r
156 <available file="Conf/target.template"/>\r
157 <then>\r
158 <echo message="Copy file from Conf/target.template to Conf/target.txt" />\r
159 <copy file="Conf/target.template" tofile="Conf/target.txt" overwrite="true" />\r
160 </then>\r
161 </if>\r
162\r
163 <if>\r
164 <available file="Conf/FrameworkDatabase.template"/>\r
165 <then>\r
166 <echo message="Copy file from Conf/FrameworkDatabase.template to Conf/FrameworkDatabase.db" />\r
167 <copy file="Conf/FrameworkDatabase.template" tofile="Conf/FrameworkDatabase.db" overwrite="true" />\r
168 </then>\r
169 </if>\r
170 </target>\r
171\r
878ddf1f 172 <target name="clean">\r
173 <subant target="clean" inheritall="false">\r
174 <filelist dir="."\r
175 files="\r
feccee87 176 Java/Source/FrameworkWizard/build.xml \r
177 Java/Source/Cpptasks/build.xml \r
178 Java/Source/FrameworkTasks/build.xml \r
179 Java/Source/GenBuild/build.xml \r
180 Java/Source/PcdTools/build.xml \r
181 Java/Source/Common/build.xml \r
182 Java/Source/SurfaceArea/build.xml \r
feccee87 183 Java/Source/MigrationTools/build.xml\r
184 Java/Source/ContextTool/build.xml\r
185 Java/Source/Merge/build.xml\r
0062d29a 186 Java/Source/CheckTools/build.xml\r
d7bb5113 187 CCode/Source/build.xml\r
7f762c2d 188 "/>\r
878ddf1f 189 </subant>\r
190 </target>\r
2a8198da 191\r
878ddf1f 192 <target name="cleanall">\r
d7bb5113 193 <echo message="Removing extra ${env.WORKSPACE} history.xml files!"/>\r
194 <if>\r
195 <available file="${env.WORKSPACE}/Tools/bin/history.xml"/>\r
196 <then>\r
197 <delete failonerror="false" quiet="true">\r
198 <fileset file="${env.WORKSPACE}/Tools/bin/history.xml"/>\r
199 </delete>\r
200 </then>\r
201 </if>\r
202 <if>\r
203 <available file="${env.WORKSPACE}/Tools/CCode/Source/Library/history.xml"/>\r
204 <then>\r
205 <delete failonerror="false" quiet="true">\r
206 <fileset file="${env.WORKSPACE}/Tools/CCode/Source/Library/history.xml"/>\r
207 </delete>\r
208 </then>\r
209 </if>\r
8a07290e 210 <available classname="org.tianocore.frameworkwizard.FrameworkWizardUI" property="FrameworkWizardUI.available"/>\r
211 <available classname="org.tianocore.build.GenBuildTask" property="GenBuildTask.available"/>\r
212 <available classname="org.tianocore.framework.tasks.Tool" property="Tool.available"/>\r
213 <available classname="org.tianocore.pcd.action.BuildAction" property="PcdClass.available"/>\r
214 <if>\r
215 <or>\r
216 <isset property="FrameworkWizardUI.available"/>\r
217 <isset property="GenBuildTask.available"/>\r
218 <isset property="Tool.available"/>\r
219 <isset property="PcdClass.available"/>\r
220 </or>\r
221 <then>\r
222 <fail message="Use ant -noclasspath cleanall, to remove all jar files!"/>\r
223 </then>\r
224 </if>\r
7f762c2d 225 <subant target="cleanall" inheritall="true">\r
878ddf1f 226 <filelist dir="."\r
227 files="\r
feccee87 228 Java/Source/FrameworkWizard/build.xml \r
229 Java/Source/Cpptasks/build.xml \r
230 Java/Source/FrameworkTasks/build.xml \r
231 Java/Source/GenBuild/build.xml \r
232 Java/Source/PcdTools/build.xml \r
233 Java/Source/Common/build.xml \r
234 Java/Source/SurfaceArea/build.xml \r
feccee87 235 Java/Source/MigrationTools/build.xml\r
236 Java/Source/ContextTool/build.xml\r
237 Java/Source/Merge/build.xml\r
0062d29a 238 Java/Source/CheckTools/build.xml\r
d7bb5113 239 CCode/Source/build.xml\r
7f762c2d 240 "/>\r
878ddf1f 241 </subant>\r
242 </target>\r
243</project>\r