summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-14 07:00:48 +0000
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-14 07:00:48 +0000
commit88f858a1355fc338f8cc7e9a9246a8c0a98da10f (patch)
treed8ddb92e5f2d47701fc83e890bb86ad9f1ee3575 /Tools
parent7b086bab60be422ae5417d3c801356aa162ab6f9 (diff)
downloadedk2-88f858a1355fc338f8cc7e9a9246a8c0a98da10f.zip
edk2-88f858a1355fc338f8cc7e9a9246a8c0a98da10f.tar.gz
edk2-88f858a1355fc338f8cc7e9a9246a8c0a98da10f.tar.bz2
Using ${OBJECTS} instead of fileset to trace all obj files. Add a new Macro named Build_Init to provide a way to initial some properties for user.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1252 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r--Tools/Conf/BuildMacro.xml27
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java6
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java6
3 files changed, 28 insertions, 11 deletions
diff --git a/Tools/Conf/BuildMacro.xml b/Tools/Conf/BuildMacro.xml
index cd9b805..41e2163 100644
--- a/Tools/Conf/BuildMacro.xml
+++ b/Tools/Conf/BuildMacro.xml
@@ -11,6 +11,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-->
<project name="common">
<!--
+ Macro for intialize some properties. This Macro build will be called before source file build.
+ -->
+ <macrodef name="Build_Init">
+ <sequential>
+ <var name="OBJECTS" value="" />
+ <var name="SDB_FILES" value="" />
+ </sequential>
+ </macrodef>
+
+
+ <!--
macro definitions for building files with different types
-->
<!--
@@ -60,6 +71,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</cc>
</sequential>
</OnDependency>
+ <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />
</sequential>
</macrodef>
@@ -108,6 +120,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</cc>
</sequential>
</OnDependency>
+ <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />
</sequential>
</macrodef>
@@ -252,6 +265,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</cc>
</sequential>
</OnDependency>
+ <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />
</sequential>
</macrodef>
@@ -293,6 +307,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</cc>
</sequential>
</OnDependency>
+ <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />
</sequential>
</macrodef>
@@ -349,6 +364,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</cc>
</sequential>
</OnDependency>
+ <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />
</sequential>
</macrodef>
@@ -396,7 +412,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<OnDependency>
<sourcefiles>
- <fileset casesensitive="on" dir="${DEST_DIR_OUTPUT}" includes="**/*.obj"/>
+ <file list="${OBJECTS}" />
</sourcefiles>
<targetfiles>
<file name="${BIN_DIR}/@{FILENAME}.lib"/>
@@ -408,7 +424,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outputFile="${BIN_DIR}/@{FILENAME}.lib">
<argument value="${SLINK_FLAGS}"/>
- <fileset casesensitive="on" dir="${DEST_DIR_OUTPUT}" includes="**/*.obj"/>
+ <argument value="${OBJECTS}"/>
</command>
</cc>
</sequential>
@@ -525,7 +541,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</cc>
</sequential>
</OnDependency>
-
+ <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj" />
</sequential>
</macrodef>
@@ -579,6 +595,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<delete file="${PLATFORM_DIR}/@{FILENAME}.i" />
</sequential>
</OnDependency>
+ <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />
</sequential>
</macrodef>
@@ -618,7 +635,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<OnDependency>
<sourcefiles>
<file list="${LIBS}"/>
- <fileset casesensitive="on" dir="${DEST_DIR_OUTPUT}" includes="**/*.obj"/>
+ <file list="${OBJECTS}"/>
</sourcefiles>
<targetfiles>
<file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll"/>
@@ -630,7 +647,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Local.lib">
<argument value="${SLINK_FLAGS}"/>
- <fileset casesensitive="on" dir="${DEST_DIR_OUTPUT}" includes="**/*.obj"/>
+ <argument value="${OBJECTS}"/>
</command>
</cc>
<cc userdefine="on">
diff --git a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java
index 72870e0..7a9d7c4 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java
@@ -285,7 +285,6 @@ public class GenBuildTask extends Ant {
// MODULE or BASE_NAME, GUID or FILE_GUID, VERSION, MODULE_TYPE
// MODULE_DIR, MODULE_RELATIVE_DIR
// SUBSYSTEM, ENTRYPOINT, EBC_TOOL_LIB_PATH
- // LIBS, OBJECTS, SDB_FILES
//
setModuleCommonProperties(archList[k]);
@@ -429,12 +428,7 @@ public class GenBuildTask extends Ant {
getProject().setProperty("ENTRYPOINT", "_ModuleEntryPoint");
}
- //
- // LIBS, OBJECTS, SDB_FILES
- //
getProject().setProperty("OBJECTS", "");
- getProject().setProperty("SDB_FILES", "");
- getProject().setProperty("LIBS", "");
}
private void getCompilerFlags(String target, String toolchain, FpdModuleIdentification fpdModuleId) throws EdkException {
diff --git a/Tools/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java b/Tools/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java
index 49628af..cdd8814 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java
@@ -414,6 +414,12 @@ public class ModuleBuildFileGenerator {
FileProcess fileProcess = new FileProcess();
fileProcess.init(project, includes, document);
+
+ //
+ // Initialize some properties by user
+ //
+ Element initEle = document.createElement("Build_Init");
+ root.appendChild(initEle);
String moduleDir = project.getProperty("MODULE_DIR");
//