Add class header to FrameworkBuildTask. Remove some unused code from top level build.xml.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1306 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
wuyizhong 2006-08-17 06:51:51 +00:00
parent 681dbac98c
commit 2d16dcec6f
3 changed files with 38 additions and 6 deletions

View File

@ -29,6 +29,41 @@ import org.tianocore.build.toolchain.ConfigReader;
import org.tianocore.build.toolchain.ToolChainInfo; import org.tianocore.build.toolchain.ToolChainInfo;
import org.tianocore.common.definitions.ToolDefinitions; import org.tianocore.common.definitions.ToolDefinitions;
/**
<p>
<code>FrameworkBuildTask</code> is an Ant task. The main function is finding
and processing a FPD or MSA file, then building a platform or stand-alone
module.
<p>
The task search current directory and find out all MSA and FPD files by file
extension. Base on ACTIVE_PLATFORM policy, decide to build a platform or a
stand-alone module. The ACTIVE_PLATFORM policy is:
<pre>
1. More than one MSA files, report error;
2. Only one MSA file, but ACTIVE_PLATFORM is not specified, report error;
3. Only one MSA file, and ACTIVE_PLATFORM is also specified, build this module;
4. No MSA file, and ACTIVE_PLATFORM is specified, build the active platform;
5. No MSA file, no ACTIVE_PLATFORM, and no FPD file, report error;
6. No MSA file, no ACTIVE_PLATFORM, and only one FPD file, build the platform;
7. No MSA file, no ACTIVE_PLATFORM, and more than one FPD files, list all platform
and let user choose one.
</pre>
<p>
Framework build task also parse target file [${WORKSPACE_DIR}/Tools/Conf/target.txt].
And load all system environment variables to Ant properties.
<p>
The usage for this task is :
<pre>
&lt;FrameworkBuild type="cleanall" /&gt;
</pre>
@since GenBuild 1.0
**/
public class FrameworkBuildTask extends Task{ public class FrameworkBuildTask extends Task{
private Set<File> buildFiles = new LinkedHashSet<File>(); private Set<File> buildFiles = new LinkedHashSet<File>();
@ -103,8 +138,6 @@ public class FrameworkBuildTask extends Task{
getProject().setProperty("WORKSPACE_DIR", workspacePath.getPath().replaceAll("(\\\\)", "/")); getProject().setProperty("WORKSPACE_DIR", workspacePath.getPath().replaceAll("(\\\\)", "/"));
GlobalData.initInfo(dbFilename, workspacePath.getPath(), toolsDefFilename); GlobalData.initInfo(dbFilename, workspacePath.getPath(), toolsDefFilename);
// //
// If find MSA file and ACTIVE_PLATFORM is set, build the module; // If find MSA file and ACTIVE_PLATFORM is set, build the module;
// else fail build. // else fail build.

View File

@ -55,12 +55,14 @@ import org.tianocore.build.tools.ModuleItem;
<p>The main function of this task is to parse module's surface area (MSA), <p>The main function of this task is to parse module's surface area (MSA),
then generate the corresponding <em>BaseName_build.xml</em> (the real ANT then generate the corresponding <em>BaseName_build.xml</em> (the real ANT
build script) and call this to build the module. The whole process including: build script) and call this to build the module. The whole process including:
<pre>
1. generate AutoGen.c and AutoGen.h; 1. generate AutoGen.c and AutoGen.h;
2. build all dependent library instances; 2. build all dependent library instances;
3. build all source files inlcude AutoGen.c; 3. build all source files inlcude AutoGen.c;
4. generate sections; 4. generate sections;
5. generate FFS file if it is driver module while LIB file if it is Library module. 5. generate FFS file if it is driver module while LIB file if it is Library module.
</p> </pre>
<p> <p>
The usage is (take module <em>HelloWorld</em> for example): The usage is (take module <em>HelloWorld</em> for example):

View File

@ -33,9 +33,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<fail message="WORKSPACE environmental variable not set." /> <fail message="WORKSPACE environmental variable not set." />
</then> </then>
</if> </if>
<!--
<ToolChainSetup confPath="${WORKSPACE_DIR}/Tools/Conf" />
-->
</target> </target>
<target name="build"> <target name="build">