Added <if> task to check if FrameworkDatabase.db exists or not before doing copy
[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
a7828769 17 <target name="all" depends="C_Code"/>\r
18\r
19 <target name="C_Code" depends="JavaCode">\r
20 <subant target="" inheritall="false">\r
21 <filelist dir="."\r
22 files="\r
23 Source/TianoTools/build.xml\r
24 "/>\r
25 </subant>\r
26 </target>\r
27\r
878ddf1f 28 <target name="JavaCode" depends="SurfaceArea">\r
29 <subant target="" verbose="true" inheritall="false">\r
30 <!-- Note: this is an ordered list. The projects have dependencies between them. -->\r
31 <filelist dir="."\r
32 files="\r
b9546cc8 33 Source/Common/build.xml\r
878ddf1f 34 Source/GenBuild/build.xml\r
35 Source/FrameworkTasks/build.xml\r
36 Source/Cpptasks/build.xml\r
2a8198da 37 Source/FrameworkWizard/build.xml\r
ee80c4d0 38 "/>\r
878ddf1f 39 </subant>\r
40 </target>\r
41\r
878ddf1f 42 <target name="SurfaceArea" depends="makeCatalog">\r
43 <subant target="" verbose="true" inheritall="false">\r
44 <filelist dir="."\r
45 files="\r
46 Source/SurfaceArea/build.xml\r
47 "/>\r
48 </subant>\r
49 </target>\r
50\r
878ddf1f 51 <target name="makeCatalog">\r
52 <echo file="XMLSchema/catalog.xml">\r
53 <![CDATA[<?xml version="1.0"?>\r
54<!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
55<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">\r
56 <rewriteSystem systemIdStartString="http://www.TianoCore.org/2006/Edk2.0/"\r
57 rewritePrefix="file:/]]>${env.WORKSPACE}<![CDATA[/Tools/XMLSchema/"/>\r
58 <rewriteURI uriStartString="http://www.TianoCore.org/2006/Edk2.0/"\r
59 rewritePrefix="file:/]]>${env.WORKSPACE}<![CDATA[/Tools/XMLSchema/"/>\r
60</catalog>]]>\r
61 </echo>\r
113ecc36 62 <copy file="Conf/tools_def.template" tofile="Conf/tools_def.txt" overwrite="false"/>\r
9ae9341a 63 <copy file="Conf/target.template" tofile="Conf/target.txt" overwrite="false"/>\r
3c8842bc 64 <if>\r
65 <not>\r
66 <available file="Conf/FrameworkDatabase.db"/>\r
67 </not>\r
68 <then>\r
69 <copy file="Conf/FrameworkDatabase.template" tofile="Conf/FrameworkDatabase.db"/>\r
70 </then>\r
71 </if>\r
878ddf1f 72 </target>\r
2a8198da 73\r
878ddf1f 74 <target name="clean">\r
75 <subant target="clean" inheritall="false">\r
76 <filelist dir="."\r
77 files="\r
78 Source/TianoTools/build.xml\r
2a8198da 79 Source/FrameworkWizard/build.xml\r
80 Source/Cpptasks/build.xml\r
878ddf1f 81 Source/FrameworkTasks/build.xml\r
82 Source/GenBuild/build.xml\r
2a8198da 83 Source/Common/build.xml\r
878ddf1f 84 Source/SurfaceArea/build.xml\r
878ddf1f 85 "/>\r
86 </subant>\r
87 </target>\r
2a8198da 88\r
878ddf1f 89 <target name="cleanall">\r
2a8198da 90 <subant target="cleanall" inheritall="false">\r
878ddf1f 91 <filelist dir="."\r
92 files="\r
93 Source/TianoTools/build.xml\r
2a8198da 94 Source/FrameworkWizard/build.xml\r
95 Source/Cpptasks/build.xml\r
878ddf1f 96 Source/FrameworkTasks/build.xml\r
97 Source/GenBuild/build.xml\r
2a8198da 98 Source/Common/build.xml\r
878ddf1f 99 Source/SurfaceArea/build.xml\r
878ddf1f 100 "/>\r
101 </subant>\r
102 </target>\r
103</project>\r