X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FAutoGen%2FGenMake.py;h=3720c8bfedbdfb8abdd2ba8ae669f7c2bf540c2f;hp=49ac33f47f39084216eb77efba563b3be734acdf;hb=79b74a03e018ecbf03d8d50e6f20301e249c1ba5;hpb=641370270f9b0386ca273c187bde8e6083c7cb98 diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py index 49ac33f47f..3720c8bfed 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -31,7 +31,7 @@ gIncludePattern = re.compile(r"^[ \t]*#?[ \t]*include(?:[ \t]*(?:\\(?:\r\n|\r|\n ## Regular expression for matching macro used in header file inclusion gMacroPattern = re.compile("([_A-Z][_A-Z0-9]*)[ \t]*\((.+)\)", re.UNICODE) -## pattern for include style in R8.x code +## pattern for include style in Edk.x code gProtocolDefinition = "Protocol/%(HeaderKey)s/%(HeaderKey)s.h" gGuidDefinition = "Guid/%(HeaderKey)s/%(HeaderKey)s.h" gArchProtocolDefinition = "ArchProtocol/%(HeaderKey)s/%(HeaderKey)s.h" @@ -462,13 +462,13 @@ cleanlib: ArchEntryPoint = ModuleEntryPoint if self._AutoGenObject.Arch == "EBC": - # EBC compiler always use "EfiStart" as entry point. Only applies to R9 modules + # EBC compiler always use "EfiStart" as entry point. Only applies to EdkII modules ImageEntryPoint = "EfiStart" elif self._AutoGenObject.AutoGenVersion < 0x00010005: - # R8 modules use entry point specified in INF file + # Edk modules use entry point specified in INF file ImageEntryPoint = ModuleEntryPoint else: - # R9 modules always use "_ModuleEntryPoint" as entry point + # EdkII modules always use "_ModuleEntryPoint" as entry point ImageEntryPoint = "_ModuleEntryPoint" # tools definitions @@ -493,7 +493,7 @@ cleanlib: # convert source files and binary files to build targets self.ResultFileList = [str(T.Target) for T in self._AutoGenObject.CodaTargetList] - if len(self.ResultFileList) == 0: + if len(self.ResultFileList) == 0 and len(self._AutoGenObject.SourceFileList) <> 0: EdkLogger.error("build", AUTOGEN_ERROR, "Nothing to build", ExtraData="[%s]" % str(self._AutoGenObject)) @@ -535,7 +535,7 @@ cleanlib: False ) - # R8 modules need StrDefs.h for string ID + # Edk modules need StrDefs.h for string ID #if self._AutoGenObject.AutoGenVersion < 0x00010005 and len(self._AutoGenObject.UnicodeFileList) > 0: # BcTargetList = ['strdefs'] #else: @@ -614,7 +614,7 @@ cleanlib: self.FileDependency = self.GetFileDependency( SourceFileList, ForceIncludedFile, - self._AutoGenObject.IncludePathList + self._AutoGenObject.IncludePathList + self._AutoGenObject.BuildOptionIncPathList ) DepSet = None for File in self.FileDependency: @@ -1253,7 +1253,7 @@ ${END}\t@cd $(BUILD_DIR) # fds: init \t-@cd $(FV_DIR) -${BEGIN}\tGenFds -f ${fdf_file} -o $(BUILD_DIR) -t $(TOOLCHAIN) -b $(TARGET) -p ${active_platform} -a ${build_architecture_list} ${extra_options}${END}${BEGIN} -r ${fd} ${END}${BEGIN} -i ${fv} ${END}${BEGIN} -D ${macro} ${END} +${BEGIN}\tGenFds -f ${fdf_file} -o $(BUILD_DIR) -t $(TOOLCHAIN) -b $(TARGET) -p ${active_platform} -a ${build_architecture_list}${END}${BEGIN}${extra_options}${END}${BEGIN} -r ${fd}${END}${BEGIN} -i ${fv}${END}${BEGIN} -C ${cap}${END}${BEGIN} -D${macro}${END} # # run command for emulator platform only @@ -1335,6 +1335,9 @@ ${END}\t@cd $(BUILD_DIR)\n if GlobalData.gCaseInsensitive: ExtraOption += " -c" + ExtraOptionList = [] + if ExtraOption: + ExtraOptionList.append(ExtraOption) MakefileName = self._FILE_NAME_[self._FileType] SubBuildCommandList = [] @@ -1365,7 +1368,8 @@ ${END}\t@cd $(BUILD_DIR)\n "active_platform" : str(PlatformInfo), "fd" : PlatformInfo.FdTargetList, "fv" : PlatformInfo.FvTargetList, - "extra_options" : ExtraOption, + "cap" : PlatformInfo.CapTargetList, + "extra_options" : ExtraOptionList, "macro" : MacroList, }