[edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structure PCD is referred

Chang, Abner via groups.io posted 1 patch 4 months ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/Workspace/DscBuildData.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
[edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structure PCD is referred
Posted by Chang, Abner via groups.io 4 months ago
From: Abner Chang <abner.chang@amd.com>

Build fail if structured PCD is referred because a messy
makefile is generated, only happens under Windows system.

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
---
 BaseTools/Source/Python/Workspace/DscBuildData.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 817cdbe5f19..391b09658fc 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -2840,7 +2840,10 @@ class DscBuildData(PlatformBuildClassObject):
         # start generating makefile
         MakeApp = PcdMakefileHeader
         if sys.platform == "win32":
-            MakeApp = MakeApp + r'APPFILE = %s\%s.exe\n' % (self.OutputPath, PcdValueInitName) + r'APPNAME = %s\n' % (PcdValueInitName) + r'OBJECTS = %s\%s.obj %s.obj\n' % (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + 'INC = '
+            MakeApp = MakeApp + r'APPFILE = %s\%s.exe' % (self.OutputPath, PcdValueInitName) + '\n'\
+              + r'APPNAME = %s' % (PcdValueInitName) + '\n'\
+              + r'OBJECTS = %s\%s.obj %s.obj' % (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) +'\n'\
+              + 'INC = '
         else:
             MakeApp = MakeApp + PcdGccMakefile
             MakeApp = MakeApp + 'APPFILE = %s/%s\n' % (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % (PcdValueInitName) + 'OBJECTS = %s/%s.o %s.o\n' % (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + \
@@ -2950,8 +2953,8 @@ class DscBuildData(PlatformBuildClassObject):
             MakeApp += "$(OBJECTS) : %s\n" % include_file
         if sys.platform == "win32":
             PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\C\Common\PcdValueCommon.c"))
-            MakeApp = MakeApp + r'%s\PcdValueCommon.c : %s\n' % (self.OutputPath, PcdValueCommonPath)
-            MakeApp = MakeApp + '\tcopy /y %s $@\n' % (PcdValueCommonPath)
+            MakeApp = MakeApp + r'%s\PcdValueCommon.c : %s' % (self.OutputPath, PcdValueCommonPath) + '\n'
+            MakeApp = MakeApp + '\tcopy /y %s $@' % (PcdValueCommonPath) + '\n'
         else:
             PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source/C/Common/PcdValueCommon.c"))
             MakeApp = MakeApp + '%s/PcdValueCommon.c : %s\n' % (self.OutputPath, PcdValueCommonPath)
-- 
2.37.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112941): https://edk2.groups.io/g/devel/message/112941
Mute This Topic: https://groups.io/mt/103395845/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-