From: jwang36 Date: Thu, 8 Mar 2007 01:44:17 +0000 (+0000) Subject: - Fixed PVCS tracker 484 by merging the GenDll and GenEfi macro in BuildMacro.xml... X-Git-Tag: edk2-stable201903~23453 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=a30ae9faeaafd760cc4a41a2abffcfd2b28742c1;hp=64b41a0710cb8bea96daca72c6339e6b19e54c89 - 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 --- diff --git a/Tools/Conf/BuildMacro.xml b/Tools/Conf/BuildMacro.xml index cf523c5f19..18ccd102f7 100644 --- a/Tools/Conf/BuildMacro.xml +++ b/Tools/Conf/BuildMacro.xml @@ -974,16 +974,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - + - + @@ -997,102 +994,152 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - + + + + - + + + + + + + + - + - + - - - - - - - - + + - - - - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - @@ -1102,44 +1149,31 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - + + + + - + - - - - - - - - - - - - - - - - - @@ -1149,8 +1183,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - + + @@ -1415,95 +1449,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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: