Added <if> task to check if FrameworkDatabase.db exists or not before doing copy
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 31 Jul 2006 08:17:22 +0000 (08:17 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 31 Jul 2006 08:17:22 +0000 (08:17 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1155 6f19259b-4bc3-4df7-8a09-765794883524

Tools/build.xml

index d68fd6f..1afe6ed 100644 (file)
@@ -11,6 +11,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 -->\r
 <project name="Tools" default="all" basedir=".">\r
 \r
+  <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
   <property environment="env"/>\r
 \r
   <target name="all" depends="C_Code"/>\r
@@ -60,7 +61,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     </echo>\r
     <copy file="Conf/tools_def.template" tofile="Conf/tools_def.txt" overwrite="false"/>\r
     <copy file="Conf/target.template" tofile="Conf/target.txt" overwrite="false"/>\r
-    <copy file="Conf/FrameworkDatabase.template" tofile="Conf/FrameworkDatabase.db" overwrite="false"/>\r
+    <if>\r
+      <not>\r
+        <available file="Conf/FrameworkDatabase.db"/>\r
+      </not>\r
+      <then>\r
+        <copy file="Conf/FrameworkDatabase.template" tofile="Conf/FrameworkDatabase.db"/>\r
+      </then>\r
+    </if>\r
   </target>\r
 \r
   <target name="clean">\r