]> git.proxmox.com Git - mirror_edk2.git/blame - Tools/Source/GenBuild/org/tianocore/build/ExpandTask.java
Initial import.
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / ExpandTask.java
CommitLineData
878ddf1f 1/** @file\r
2 This file is ANT task Expand. \r
3 \r
4 Expand task is used to prepare ANT properties for further build. \r
5\r
6Copyright (c) 2006, Intel Corporation\r
7All rights reserved. This program and the accompanying materials\r
8are licensed and made available under the terms and conditions of the BSD License\r
9which accompanies this distribution. The full text of the license may be found at\r
10http://opensource.org/licenses/bsd-license.php\r
11\r
12THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14\r
15**/\r
16package org.tianocore.build;\r
17\r
18import org.apache.tools.ant.BuildException;\r
19import org.apache.tools.ant.Task;\r
20\r
21import org.tianocore.build.global.GlobalData;\r
22\r
23/**\r
24 Expand task is used to prepare ANT properties for further build. \r
25 <p>Current, prepare the dependent Library instance list for <code>LIBS</code></p>\r
26 \r
27 @since GenBuild 1.0\r
28**/\r
29public class ExpandTask extends Task {\r
30 \r
31 /**\r
32 Public construct method. It is necessary for ANT task.\r
33 **/\r
34 public ExpandTask () {\r
35 }\r
36 \r
37 /**\r
38 ANT task's entry point, will be called after init().\r
39 \r
40 Set <code>LIBS</code> for further build usage. \r
41 **/\r
42 public void execute() throws BuildException {\r
43 \r
44 String[] libraries = GlobalData.getModuleLibrary(getProject().getProperty("BASE_NAME"));\r
45 String str = "";\r
46 for (int i = 0; i < libraries.length; i ++){\r
47 str += " " + GlobalData.getLibrary(libraries[i]);\r
48 }\r
49 getProject().setProperty("LIBS", str);\r
50 \r
51 }\r
52}\r