]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainTask.java
4b0577bea3aa0302b1b59fcecd34c0372bfdd722
[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 java.io.File;
19
20 import org.apache.tools.ant.BuildException;
21 import org.apache.tools.ant.Task;
22
23 /**
24 This class is an ANT task. The main function is to read all tool chain related
25 config files.
26
27 @since GenBuild 1.0
28 **/
29 public class ToolChainTask extends Task{
30 ///
31 /// environment variable name of toolchain
32 ///
33 static private String toolsEnv = "env.TOOLS_DEF";
34 ///
35 /// configuration file path
36 ///
37 private String confPath = ".";
38
39 /**
40 Public construct method. It is necessary for ANT task.
41 **/
42 public ToolChainTask(){
43 }
44
45 /**
46 ANT task's entry point, will be called after init(). Using
47 <code>ToolChainFactory</code> to parse all config files, and
48 set TARGET property.
49
50 @throws BuildException
51 Config files are invalid.
52 **/
53 public void execute() throws BuildException {
54 String toolChain = getProject().getProperty(toolsEnv);
55 // ToolChainConfig toolchain = new ToolChainConfig(new File(confPath + File.separatorChar + toolChain));
56 //getProject().setProperty("TARGET", toolchain.getCurrentTarget());
57 }
58
59 /**
60 Set the path of config files.
61
62 @param confPath the path of config files
63 **/
64 public void setConfPath(String confPath) {
65 this.confPath = confPath;
66 }
67 }