diff options
author | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-24 09:05:56 +0000 |
---|---|---|
committer | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-24 09:05:56 +0000 |
commit | 66a9a6f8e99c1bf744e012448afcbd62bda7034d (patch) | |
tree | 8f41c6bc2ea023e62005563c9806b961036d772c /Tools/Java | |
parent | ff7bc6c4254598cc28e8ad1a9443377d3b6ef832 (diff) | |
download | edk2-66a9a6f8e99c1bf744e012448afcbd62bda7034d.tar.gz edk2-66a9a6f8e99c1bf744e012448afcbd62bda7034d.tar.bz2 edk2-66a9a6f8e99c1bf744e012448afcbd62bda7034d.zip |
- Fixed EDKT513 by adding existing section files into the dependency check of genffsfile tool;
- Fixed EDKT514 by removing the generation and build of AutoGen.c for library
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2295 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java')
3 files changed, 27 insertions, 14 deletions
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/FfsProcess.java b/Tools/Java/Source/GenBuild/org/tianocore/build/FfsProcess.java index baa9eab9a5..884a0d7453 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/FfsProcess.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/FfsProcess.java @@ -186,14 +186,18 @@ public class FfsProcess { //
Element outofdateEle = document.createElement("OnDependency");
Element sourceEle = document.createElement("sourcefiles");
- String[] result = new String[sectionList.size()];
+ Vector<String> sections = new Vector<String>();
for (int i = 0; i < sectionList.size(); i++) {
- result[i] = (String) sectionList.get(i);
+ String section = (String) sectionList.get(i);
+ if (isSectionType(section)) {
+ sections.addElement(section);
+ }
Element pathEle = document.createElement("file");
- pathEle.setAttribute("name", "${DEST_DIR_OUTPUT}" + File.separatorChar + basename
- + getSectionExt(result[i]));
+ pathEle.setAttribute("name", getSectionFile(basename, section));
sourceEle.appendChild(pathEle);
}
+ String[] result = sections.toArray(new String[sections.size()]);
+
outofdateEle.appendChild(sourceEle);
Element targetEle = document.createElement("targetfiles");
Element fileEle = document.createElement("file");
@@ -370,14 +374,17 @@ public class FfsProcess { if (fileName == null) {
list.addElement(type);
+ } else {
+ list.addElement(fileName);
}
+
if (mode == MODE_GUID_DEFINED) {
//
// <input file="${DEST_DIR_OUTPUT}\Bds.pe32"/>
//
Element ele = doc.createElement("input");
if (fileName == null) {
- ele.setAttribute("file", "${DEST_DIR_OUTPUT}" + File.separatorChar + basename + getSectionExt(type));
+ ele.setAttribute("file", getSectionFile(basename, type));
} else {
ele.setAttribute("file", fileName);
}
@@ -388,7 +395,7 @@ public class FfsProcess { //
Element ele = doc.createElement("sectFile");
if (fileName == null) {
- ele.setAttribute("fileName", "${DEST_DIR_OUTPUT}" + File.separatorChar + basename + getSectionExt(type));
+ ele.setAttribute("fileName", getSectionFile(basename, type));
} else {
ele.setAttribute("fileName", fileName);
}
@@ -402,13 +409,22 @@ public class FfsProcess { @param type Section type
@return Corresponding section file extension
**/
- private String getSectionExt(String type) {
+ private String getSectionFile(String basename, String type) {
+ for (int i = 0; i < sectionExt.length; i++) {
+ if (sectionExt[i][0].equalsIgnoreCase(type)) {
+ return "${DEST_DIR_OUTPUT}" + File.separatorChar + basename + sectionExt[i][1];
+ }
+ }
+ return type;
+ }
+
+ private boolean isSectionType(String type) {
for (int i = 0; i < sectionExt.length; i++) {
if (sectionExt[i][0].equalsIgnoreCase(type)) {
- return sectionExt[i][1];
+ return true;
}
}
- return ".sec";
+ return false;
}
/**
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java b/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java index da6847d9da..9c65d673d9 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java @@ -423,7 +423,8 @@ public class ModuleBuildFileGenerator { //
// Parse AutoGen.c & AutoGen.h
//
- if ( ! fpdModuleId.getModule().getName().equalsIgnoreCase("Shell")) {
+ if (!fpdModuleId.getModule().isLibrary()
+ && !fpdModuleId.getModule().getName().equalsIgnoreCase("Shell")) {
fileProcess.parseFile(project.getProperty("DEST_DIR_DEBUG") + File.separatorChar + "AutoGen.c", null, root, false);
}
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java b/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java index ce6ff61842..b7d6ec4e39 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java @@ -673,10 +673,6 @@ public class AutoGen { fileBuffer.append(ToolDefinitions.LINE_SEPARATOR);
fileBuffer.append(this.myPcdAutogen.getCAutoGenString());
}
-
- if (!saveFile(outputPath + File.separatorChar + "AutoGen.c", fileBuffer)) {
- throw new AutoGenException("Failed to generate AutoGen.c !!!");
- }
}
/**
|