Support prebuild and postbuild for UserExtension for Platform build. If UserExtension...
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / toolchain / ToolChainTask.java
1 /** @file
2 ToolChainTask class.
3
4 ToolChainTask class's main fucntion is read all tool chain related config files.
5
6 Copyright (c) 2006, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 **/
16 package org.tianocore.build.toolchain;
17
18 import org.apache.tools.ant.BuildException;
19 import org.apache.tools.ant.Task;
20
21 /**
22 This class is an ANT task. The main function is to read all tool chain related
23 config files.
24
25 @since GenBuild 1.0
26 **/
27 public class ToolChainTask extends Task{
28 ///
29 /// environment variable name of toolchain
30 ///
31 static private String toolsEnv = "env.TOOLS_DEF";
32 ///
33 /// configuration file path
34 ///
35 private String confPath = ".";
36
37 /**
38 Public construct method. It is necessary for ANT task.
39 **/
40 public ToolChainTask(){
41 }
42
43 /**
44 ANT task's entry point, will be called after init(). Using
45 <code>ToolChainFactory</code> to parse all config files, and
46 set TARGET property.
47
48 @throws BuildException
49 Config files are invalid.
50 **/
51 public void execute() throws BuildException {
52 String toolChain = getProject().getProperty(toolsEnv);
53 // ToolChainConfig toolchain = new ToolChainConfig(new File(confPath + File.separatorChar + toolChain));
54 //getProject().setProperty("TARGET", toolchain.getCurrentTarget());
55 }
56
57 /**
58 Set the path of config files.
59
60 @param confPath the path of config files
61 **/
62 public void setConfPath(String confPath) {
63 this.confPath = confPath;
64 }
65 }