From b0e23cf32bc5f13c77e80b1e63faa14511c118c1 Mon Sep 17 00:00:00 2001 From: Yingke Liu Date: Mon, 19 Jan 2015 05:01:39 +0000 Subject: [PATCH] Fixed build issue with fds target specified. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu Reviewed-by: Liming Gao Reviewed-by: Hesheng Chen git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16619 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/build/build.py | 39 +++++++++++--------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 40d4055bfc..9b48ac094b 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -2,7 +2,7 @@ # build a platform or a module # # Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -932,11 +932,6 @@ class Build(): makefile = GenMake.BuildFile(AutoGenObject)._FILE_NAME_[GenMake.gMakeType] - # genfds - if Target == 'fds': - LaunchCommand(AutoGenObject.GenFdsCommand, AutoGenObject.MakeFileDir) - return True - # run if Target == 'run': RunDir = os.path.normpath(os.path.join(AutoGenObject.BuildDir, GlobalData.gGlobalDefines['ARCH'])) @@ -1055,6 +1050,14 @@ class Build(): (AutoGenObject.BuildTarget, AutoGenObject.ToolChain, AutoGenObject.Arch), ExtraData=str(AutoGenObject)) + # build modules + if BuildModule: + if Target != 'fds': + BuildCommand = BuildCommand + [Target] + LaunchCommand(BuildCommand, AutoGenObject.MakeFileDir) + self.CreateAsBuiltInf() + return True + # genfds if Target == 'fds': LaunchCommand(AutoGenObject.GenFdsCommand, AutoGenObject.MakeFileDir) @@ -1068,13 +1071,6 @@ class Build(): LaunchCommand(Command, RunDir) return True - # build modules - BuildCommand = BuildCommand + [Target] - if BuildModule: - LaunchCommand(BuildCommand, AutoGenObject.MakeFileDir) - self.CreateAsBuiltInf() - return True - # build library if Target == 'libraries': pass @@ -1454,12 +1450,11 @@ class Build(): # Rebase module to the preferred memory address before GenFds # self._CollectModuleMapBuffer(MapBuffer, ModuleList) - if self.Fdf: - # - # create FDS again for the updated EFI image - # - self._Build("fds", Wa) if self.Fdf: + # + # create FDS again for the updated EFI image + # + self._Build("fds", Wa) # # Create MAP file for all platform FVs after GenFds. # @@ -1549,10 +1544,10 @@ class Build(): # Rebase module to the preferred memory address before GenFds # self._CollectModuleMapBuffer(MapBuffer, ModuleList) - # - # create FDS again for the updated EFI image - # - self._Build("fds", Wa) + # + # create FDS again for the updated EFI image + # + self._Build("fds", Wa) # # Create MAP file for all platform FVs after GenFds. # -- 2.39.2