Simplify the script. It now allows normal ant targets and flags to be passed straight...
[mirror_edk2.git] / EdkModulePkg / build.xml
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!--
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 -->
12
13 <project default="buildfpd" basedir=".">
14 <!-- Apply external ANT tasks -->
15 <taskdef resource="net/sf/antcontrib/antlib.xml" />
16 <taskdef resource="GenBuild.tasks" />
17
18 <property environment="env" />
19 <property name="WORKSPACE_DIR" value="${env.WORKSPACE}" />
20 <property name="PACKAGE" value="EdkModulePkg" />
21 <property name="PACKAGE_DIR" value="${WORKSPACE_DIR}/EdkModulePkg" />
22 <property name="BUILD_MODE" value="PACKAGE" />
23
24 <import file="${WORKSPACE_DIR}/Tools/Conf/BuildMacro.xml" />
25
26 <target name="buildfpd" depends="init, fpdparser, builds" />
27
28 <target name="init">
29 <if>
30 <not>
31 <isset property="env.WORKSPACE" />
32 </not>
33 <then>
34 <fail message="WORKSPACE environmental variable not set." />
35 </then>
36 </if>
37 <ToolChainSetup confPath="${WORKSPACE_DIR}/Tools/Conf" />
38 </target>
39
40 <target name="tools">
41 <ant antfile="${WORKSPACE_DIR}/Tools/Source/TianoTools/build.xml" />
42 </target>
43
44 <target name="fpdparser" unless="FPD_File">
45 <FPDParser fpdfilename="EdkModulePkg.fpd" />
46 </target>
47
48 <target name="builds" depends="fpdparser">
49 <ant antfile="${PACKAGE_DIR}/build.out.xml" />
50 </target>
51
52 <!-- clean. -->
53 <target name="clean" depends="init">
54 <if>
55 <available file="${PACKAGE_DIR}/build.out.xml" />
56 <then>
57 <ant antfile="${PACKAGE_DIR}/build.out.xml" target="clean" />
58 </then>
59 </if>
60 </target>
61
62 <!-- clean All. -->
63 <target name="cleanall" depends="init">
64 <if>
65 <available file="${PACKAGE_DIR}/build.out.xml" />
66 <then>
67 <ant antfile="${PACKAGE_DIR}/build.out.xml" target="cleanall" />
68 <delete file="${PACKAGE_DIR}/build.out.xml" />
69 </then>
70 </if>
71 <delete dir="${PACKAGE_DIR}/Build/FV" />
72 </target>
73
74 </project>