* [edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structure PCD is referred
@ 2023-12-28 3:04 Chang, Abner via groups.io
2023-12-28 3:08 ` Chang, Abner via groups.io
0 siblings, 1 reply; 5+ messages in thread
From: Chang, Abner via groups.io @ 2023-12-28 3:04 UTC (permalink / raw)
To: devel; +Cc: Rebecca Cran, Liming Gao, Bob Feng, Yuwei Chen
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/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structure PCD is referred
2023-12-28 3:04 [edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structure PCD is referred Chang, Abner via groups.io
@ 2023-12-28 3:08 ` Chang, Abner via groups.io
2023-12-28 16:02 ` Joey Vagedes via groups.io
0 siblings, 1 reply; 5+ messages in thread
From: Chang, Abner via groups.io @ 2023-12-28 3:08 UTC (permalink / raw)
To: Chang, Abner, devel
[-- Attachment #1: Type: text/plain, Size: 429 bytes --]
I am curious about this issue has never been observed before?
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112942): https://edk2.groups.io/g/devel/message/112942
Mute This Topic: https://groups.io/mt/103395845/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 841 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structure PCD is referred
2023-12-28 3:08 ` Chang, Abner via groups.io
@ 2023-12-28 16:02 ` Joey Vagedes via groups.io
2023-12-28 17:01 ` Joey Vagedes via groups.io
2023-12-28 23:22 ` Chang, Abner via groups.io
0 siblings, 2 replies; 5+ messages in thread
From: Joey Vagedes via groups.io @ 2023-12-28 16:02 UTC (permalink / raw)
To: Chang, Abner, devel
[-- Attachment #1: Type: text/plain, Size: 1054 bytes --]
Hello,
This is in regard to my recent patch (see commit here: BaseTools: Resolve regex syntax warnings · tianocore/edk2@9f0061a (github.com) ( https://github.com/tianocore/edk2/commit/9f0061a03b61d282fbc0ba5be22155d06a5e64a1 ) ) that was resolving the newly introduced syntax warnings (that will become syntax errors) in Python3.12 for using invalid escape characters.
A few of the strings that I converted from normal strings to raw strings to resolve the issue contained both valid and invalid escape characters. I'm going back through the changes I made in the PR to resolve any strings that contain both valid and invalid escape characters.
I will send out the patch soon.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112983): https://edk2.groups.io/g/devel/message/112983
Mute This Topic: https://groups.io/mt/103395845/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 1529 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structure PCD is referred
2023-12-28 16:02 ` Joey Vagedes via groups.io
@ 2023-12-28 17:01 ` Joey Vagedes via groups.io
2023-12-28 23:22 ` Chang, Abner via groups.io
1 sibling, 0 replies; 5+ messages in thread
From: Joey Vagedes via groups.io @ 2023-12-28 17:01 UTC (permalink / raw)
To: Joey Vagedes, devel
[-- Attachment #1: Type: text/plain, Size: 594 bytes --]
I found two other files with similar issues. Here is my patch series to resolve all.
[PATCH v1 1/1] BaseTools: Fix raw strings containing valid escape characters (groups.io) ( https://edk2.groups.io/g/devel/message/112986 )
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112987): https://edk2.groups.io/g/devel/message/112987
Mute This Topic: https://groups.io/mt/103395845/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 1043 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structure PCD is referred
2023-12-28 16:02 ` Joey Vagedes via groups.io
2023-12-28 17:01 ` Joey Vagedes via groups.io
@ 2023-12-28 23:22 ` Chang, Abner via groups.io
1 sibling, 0 replies; 5+ messages in thread
From: Chang, Abner via groups.io @ 2023-12-28 23:22 UTC (permalink / raw)
To: Joey Vagedes, devel@edk2.groups.io
[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]
[AMD Official Use Only - General]
Ok, please let me know when you merge the fix.
Thank you
Abner
From: Joey Vagedes via groups.io <joeyvagedes=microsoft.com@groups.io>
Sent: Friday, December 29, 2023 12:03 AM
To: Chang; Chang, Abner <Abner.Chang@amd.com>; devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structure PCD is referred
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Hello,
This is in regard to my recent patch (see commit here: BaseTools: Resolve regex syntax warnings · tianocore/edk2@9f0061a (github.com)<https://github.com/tianocore/edk2/commit/9f0061a03b61d282fbc0ba5be22155d06a5e64a1>) that was resolving the newly introduced syntax warnings (that will become syntax errors) in Python3.12 for using invalid escape characters.
A few of the strings that I converted from normal strings to raw strings to resolve the issue contained both valid and invalid escape characters. I'm going back through the changes I made in the PR to resolve any strings that contain both valid and invalid escape characters.
I will send out the patch soon.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112993): https://edk2.groups.io/g/devel/message/112993
Mute This Topic: https://groups.io/mt/103395845/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 5088 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-12-28 23:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-28 3:04 [edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structure PCD is referred Chang, Abner via groups.io
2023-12-28 3:08 ` Chang, Abner via groups.io
2023-12-28 16:02 ` Joey Vagedes via groups.io
2023-12-28 17:01 ` Joey Vagedes via groups.io
2023-12-28 23:22 ` Chang, Abner via groups.io
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox