4 ToolChainTask class's main fucntion is read all tool chain related config files.
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
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.
16 package org
.tianocore
.build
.toolchain
;
18 import org
.apache
.tools
.ant
.BuildException
;
19 import org
.apache
.tools
.ant
.Task
;
22 This class is an ANT task. The main function is to read all tool chain related
27 public class ToolChainTask
extends Task
{
29 private String confPath
= ".";
32 Public construct method. It is necessary for ANT task.
34 public ToolChainTask(){
38 ANT task's entry point, will be called after init(). Using
39 <code>ToolChainFactory</code> to parse all config files, and
42 @throws BuildException
43 Config files are invalid.
45 public void execute() throws BuildException
{
46 String toolChain
= getProject().getProperty("env.TOOL_CHAIN");
47 ToolChainFactory toolchain
= new ToolChainFactory(confPath
, toolChain
);
48 toolchain
.setupToolChain();
49 getProject().setProperty("TARGET", toolchain
.getCurrentTarget());
53 Set the path of config files.
55 @param confPath the path of config files
57 public void setConfPath(String confPath
) {
58 this.confPath
= confPath
;