Added quotes around the classpath option in script files
[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
4de92764 45 Java/Source/DbTools/build.xml\r
ee80c4d0 46 "/>\r
878ddf1f 47 </subant>\r
c80da0c4 48 <echo message="The EDK II Java Tools build has completed!"/>\r
49 </target>\r
50\r
51 <target name="Wizard" depends="SurfaceArea">\r
52 <subant target="" verbose="true" inheritall="false">\r
53 <!-- Note: this is an ordered list. The projects have dependencies between them. -->\r
54 <filelist dir="."\r
55 files="\r
feccee87 56 Java/Source/FrameworkWizard/build.xml\r
c80da0c4 57 "/>\r
58 </subant>\r
878ddf1f 59 </target>\r
60\r
ee2db093 61 <target name="Merge" depends="SurfaceArea">\r
62 <subant target="" verbose="true" inheritall="false">\r
63 <filelist dir="."\r
64 files="\r
feccee87 65 Java/Source/Merge/build.xml\r
ee2db093 66 "/>\r
67 </subant>\r
68 </target>\r
69\r
878ddf1f 70 <target name="SurfaceArea" depends="makeCatalog">\r
71 <subant target="" verbose="true" inheritall="false">\r
72 <filelist dir="."\r
73 files="\r
feccee87 74 Java/Source/SurfaceArea/build.xml\r
878ddf1f 75 "/>\r
76 </subant>\r
77 </target>\r
78\r
878ddf1f 79 <target name="makeCatalog">\r
c7794830 80 <if>\r
81 <not>\r
82 <available file="XMLSchema/catalog.xml"/>\r
83 </not>\r
84 <then>\r
85 <echo file="XMLSchema/catalog.xml"><![CDATA[<?xml version="1.0"?>\r
878ddf1f 86<!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
87<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">\r
88 <rewriteSystem systemIdStartString="http://www.TianoCore.org/2006/Edk2.0/"\r
89 rewritePrefix="file:/]]>${env.WORKSPACE}<![CDATA[/Tools/XMLSchema/"/>\r
90 <rewriteURI uriStartString="http://www.TianoCore.org/2006/Edk2.0/"\r
91 rewritePrefix="file:/]]>${env.WORKSPACE}<![CDATA[/Tools/XMLSchema/"/>\r
92</catalog>]]>\r
c7794830 93</echo>\r
94 </then>\r
95 </if>\r
e5890ee5 96 <if>\r
97 <not>\r
98 <available file="Conf/tools_def.txt"/>\r
99 </not>\r
100 <then>\r
101 <copy file="Conf/tools_def.template" tofile="Conf/tools_def.txt"/>\r
102 </then>\r
103 </if>\r
104\r
105 <if>\r
106 <not>\r
107 <available file="Conf/target.txt"/>\r
108 </not>\r
109 <then>\r
110 <copy file="Conf/target.template" tofile="Conf/target.txt"/>\r
111 </then>\r
112 </if>\r
113\r
3c8842bc 114 <if>\r
115 <not>\r
116 <available file="Conf/FrameworkDatabase.db"/>\r
117 </not>\r
118 <then>\r
119 <copy file="Conf/FrameworkDatabase.template" tofile="Conf/FrameworkDatabase.db"/>\r
120 </then>\r
121 </if>\r
878ddf1f 122 </target>\r
2a8198da 123\r
2fcfed38 124 <target name="reconfig">\r
125 <!-- backup all config files -->\r
126 <if>\r
127 <available file="Conf/target.txt"/>\r
128 <then>\r
129 <echo message="Backup Conf/target.txt to Conf/target.txt.bak" />\r
130 <copy file="Conf/target.txt" tofile="Conf/target.txt.bak" overwrite="true" />\r
131 </then>\r
132 </if>\r
133 <if>\r
134 <available file="Conf/tools_def.txt"/>\r
135 <then>\r
136 <echo message="Backup Conf/tools_def.txt to Conf/tools_def.txt.bak" />\r
137 <copy file="Conf/tools_def.txt" tofile="Conf/tools_def.txt.bak" overwrite="true" />\r
138 </then>\r
139 </if>\r
140 <if>\r
141 <available file="Conf/FrameworkDatabase.db"/>\r
142 <then>\r
143 <echo message="Backup Conf/FrameworkDatabase.db to Conf/FrameworkDatabase.db.bak" />\r
144 <copy file="Conf/FrameworkDatabase.db" tofile="Conf/FrameworkDatabase.db.bak" overwrite="true" />\r
145 </then>\r
146 </if>\r
147 \r
148 <if>\r
149 <available file="Conf/tools_def.template"/>\r
150 <then>\r
151 <echo message="Copy file from Conf/tools_def.template to Conf/tools_def.txt" />\r
152 <copy file="Conf/tools_def.template" tofile="Conf/tools_def.txt" overwrite="true" />\r
153 </then>\r
154 </if>\r
155\r
156 <if>\r
157 <available file="Conf/target.template"/>\r
158 <then>\r
159 <echo message="Copy file from Conf/target.template to Conf/target.txt" />\r
160 <copy file="Conf/target.template" tofile="Conf/target.txt" overwrite="true" />\r
161 </then>\r
162 </if>\r
163\r
164 <if>\r
165 <available file="Conf/FrameworkDatabase.template"/>\r
166 <then>\r
167 <echo message="Copy file from Conf/FrameworkDatabase.template to Conf/FrameworkDatabase.db" />\r
168 <copy file="Conf/FrameworkDatabase.template" tofile="Conf/FrameworkDatabase.db" overwrite="true" />\r
169 </then>\r
170 </if>\r
171 </target>\r
172\r
878ddf1f 173 <target name="clean">\r
174 <subant target="clean" inheritall="false">\r
175 <filelist dir="."\r
176 files="\r
feccee87 177 Java/Source/FrameworkWizard/build.xml \r
178 Java/Source/Cpptasks/build.xml \r
179 Java/Source/FrameworkTasks/build.xml \r
180 Java/Source/GenBuild/build.xml \r
181 Java/Source/PcdTools/build.xml \r
182 Java/Source/Common/build.xml \r
183 Java/Source/SurfaceArea/build.xml \r
feccee87 184 Java/Source/MigrationTools/build.xml\r
185 Java/Source/ContextTool/build.xml\r
186 Java/Source/Merge/build.xml\r
0062d29a 187 Java/Source/CheckTools/build.xml\r
4de92764 188 Java/Source/DbTools/build.xml\r
d7bb5113 189 CCode/Source/build.xml\r
7f762c2d 190 "/>\r
878ddf1f 191 </subant>\r
192 </target>\r
2a8198da 193\r
878ddf1f 194 <target name="cleanall">\r
d7bb5113 195 <echo message="Removing extra ${env.WORKSPACE} history.xml files!"/>\r
196 <if>\r
197 <available file="${env.WORKSPACE}/Tools/bin/history.xml"/>\r
198 <then>\r
199 <delete failonerror="false" quiet="true">\r
200 <fileset file="${env.WORKSPACE}/Tools/bin/history.xml"/>\r
201 </delete>\r
202 </then>\r
203 </if>\r
204 <if>\r
205 <available file="${env.WORKSPACE}/Tools/CCode/Source/Library/history.xml"/>\r
206 <then>\r
207 <delete failonerror="false" quiet="true">\r
208 <fileset file="${env.WORKSPACE}/Tools/CCode/Source/Library/history.xml"/>\r
209 </delete>\r
210 </then>\r
211 </if>\r
8a07290e 212 <available classname="org.tianocore.frameworkwizard.FrameworkWizardUI" property="FrameworkWizardUI.available"/>\r
213 <available classname="org.tianocore.build.GenBuildTask" property="GenBuildTask.available"/>\r
214 <available classname="org.tianocore.framework.tasks.Tool" property="Tool.available"/>\r
215 <available classname="org.tianocore.pcd.action.BuildAction" property="PcdClass.available"/>\r
216 <if>\r
217 <or>\r
218 <isset property="FrameworkWizardUI.available"/>\r
219 <isset property="GenBuildTask.available"/>\r
220 <isset property="Tool.available"/>\r
221 <isset property="PcdClass.available"/>\r
222 </or>\r
223 <then>\r
224 <fail message="Use ant -noclasspath cleanall, to remove all jar files!"/>\r
225 </then>\r
226 </if>\r
7f762c2d 227 <subant target="cleanall" inheritall="true">\r
878ddf1f 228 <filelist dir="."\r
229 files="\r
feccee87 230 Java/Source/FrameworkWizard/build.xml \r
231 Java/Source/Cpptasks/build.xml \r
232 Java/Source/FrameworkTasks/build.xml \r
233 Java/Source/GenBuild/build.xml \r
234 Java/Source/PcdTools/build.xml \r
235 Java/Source/Common/build.xml \r
236 Java/Source/SurfaceArea/build.xml \r
feccee87 237 Java/Source/MigrationTools/build.xml\r
238 Java/Source/ContextTool/build.xml\r
239 Java/Source/Merge/build.xml\r
0062d29a 240 Java/Source/CheckTools/build.xml\r
4de92764 241 Java/Source/DbTools/build.xml\r
d7bb5113 242 CCode/Source/build.xml\r
7f762c2d 243 "/>\r
878ddf1f 244 </subant>\r
245 </target>\r
246</project>\r