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