diff options
author | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-03-08 01:44:17 +0000 |
---|---|---|
committer | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-03-08 01:44:17 +0000 |
commit | a30ae9faeaafd760cc4a41a2abffcfd2b28742c1 (patch) | |
tree | 6a452165a581ef7f0cc4944630409d0bcf312c65 /Tools/Java | |
parent | 64b41a0710cb8bea96daca72c6339e6b19e54c89 (diff) | |
download | edk2-a30ae9faeaafd760cc4a41a2abffcfd2b28742c1.tar.gz edk2-a30ae9faeaafd760cc4a41a2abffcfd2b28742c1.tar.bz2 edk2-a30ae9faeaafd760cc4a41a2abffcfd2b28742c1.zip |
- Fixed PVCS tracker 484 by merging the GenDll and GenEfi macro in BuildMacro.xml to GenEfi, moving out GenDll and GenEfi macro calling inside macro EFI_SECTION_TE and EFI_SECTION_PE32, and generating the calling of GenEfi macro according to the module type (binary or library).
- Cleaned the coding style of AutoGen.java
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2429 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java')
-rw-r--r-- | Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java | 46 | ||||
-rw-r--r-- | Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java | 6 |
2 files changed, 33 insertions, 19 deletions
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java b/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java index 4f038ae25b..bbb51cd93f 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java @@ -371,19 +371,24 @@ public class ModuleBuildFileGenerator { FileProcess fileProcess = new FileProcess();
fileProcess.init(project, includes, document);
-
- //
- // Initialize some properties by user
- //
- Element initEle = document.createElement("Build_Init");
- Element initIncEle = document.createElement("EXTRA.INC");
- for (int i = 0; i < includes.length; i++) {
- Element includeEle = document.createElement("includepath");
- includeEle.setAttribute("path", includes[i]);
- initIncEle.appendChild(includeEle);
+
+ boolean isBinaryModule = fpdModuleId.getModule().isBinary();
+ boolean isLibraryModule = fpdModuleId.getModule().isLibrary();
+
+ if (!isBinaryModule) {
+ //
+ // Initialize some properties by user
+ //
+ Element initEle = document.createElement("Build_Init");
+ Element initIncEle = document.createElement("EXTRA.INC");
+ for (int i = 0; i < includes.length; i++) {
+ Element includeEle = document.createElement("includepath");
+ includeEle.setAttribute("path", includes[i]);
+ initIncEle.appendChild(includeEle);
+ }
+ initEle.appendChild(initIncEle);
+ root.appendChild(initEle);
}
- initEle.appendChild(initIncEle);
- root.appendChild(initEle);
String moduleDir = project.getProperty("MODULE_DIR");
//
@@ -421,10 +426,9 @@ public class ModuleBuildFileGenerator { }
//
- // Parse AutoGen.c & AutoGen.h
+ // Don't build AutoGen.c for library and binary module
//
- if (!fpdModuleId.getModule().isLibrary()
- && !fpdModuleId.getModule().isBinary()) {
+ if (!isLibraryModule && !isBinaryModule) {
fileProcess.parseFile(project.getProperty("DEST_DIR_DEBUG") + File.separatorChar + "AutoGen.c", null, root, false);
}
@@ -470,6 +474,18 @@ public class ModuleBuildFileGenerator { if (sectiontype.equalsIgnoreCase("EFI_SECTION_RAW") && project.getProperty("MODULE_TYPE").equalsIgnoreCase("SEC")) {
sectiontype += "_SEC";
}
+ if ((sectiontype.equalsIgnoreCase("EFI_SECTION_PE32") ||
+ sectiontype.equalsIgnoreCase("EFI_SECTION_TE"))
+ && !fpdModuleId.getModule().isLibrary()
+ && !fpdModuleId.getModule().isBinary()) {
+ //
+ // Generate code to generate efi file
+ //
+ Element ele = document.createElement("GenEfi");
+ ele.setAttribute("FILEPATH", ".");
+ ele.setAttribute("FILENAME", "${BASE_NAME}");
+ root.appendChild(ele);
+ }
Element ele = document.createElement(sectiontype);
ele.setAttribute("FILEPATH", ".");
ele.setAttribute("FILENAME", "${BASE_NAME}");
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 2d9178cfdf..7953f5ce12 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java @@ -1107,8 +1107,7 @@ public class AutoGen { fileBuffer.append(" if (EFI_ERROR (Status)) {\r\n");
fileBuffer.append(" ProcessLibraryDestructorList (gImageHandle, gST);\r\n");
fileBuffer.append(" }\r\n");
- fileBuffer
- .append(" gBS->Exit (gImageHandle, Status, 0, NULL);\r\n");
+ fileBuffer.append(" gBS->Exit (gImageHandle, Status, 0, NULL);\r\n");
} else {
fileBuffer.append(" if (!EFI_ERROR (Status) || EFI_ERROR (mDriverEntryPointStatus)) {\r\n");
fileBuffer.append(" mDriverEntryPointStatus = Status;\r\n");
@@ -1591,8 +1590,7 @@ public class AutoGen { case CommonDefinition.ModuleTypePeiCore:
case CommonDefinition.ModuleTypePeim:
fileBuffer.append(" IN EFI_FFS_FILE_HEADER *FfsHeader,\r\n");
- fileBuffer
- .append(" IN EFI_PEI_SERVICES **PeiServices\r\n");
+ fileBuffer.append(" IN EFI_PEI_SERVICES **PeiServices\r\n");
break;
case CommonDefinition.ModuleTypeDxeCore:
|