Skip to content

Commit

Permalink
BaseTools: Syntax warning invalid escape sequence \C
Browse files Browse the repository at this point in the history
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4666

This commit fixes the issue reported through BZ4666.
The Syntax warning related to invalid escape sequence
for \C is seen on Windows OS based builds of edk2 sources.
On Windows the path seperator needs to prefixed with \
so essentially we need to use \\ as path seperator.

Cc: Rebecca Cran <[email protected]>
Cc: Michael D Kinney <[email protected]>
Cc: Laszlo Ersek <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Bob Feng <[email protected]>
Cc: Yuwei Chen <[email protected]>
Cc: Jayaprakash N <[email protected]>
Signed-off-by: Jayaprakash N <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Reviewed-by: Rebecca Cran <[email protected]>
  • Loading branch information
jpshivakavi authored and mergify[bot] committed Feb 28, 2024
1 parent 6d571c0 commit 3e91e42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BaseTools/Source/Python/Workspace/DscBuildData.py
Original file line number Diff line number Diff line change
Expand Up @@ -3033,7 +3033,7 @@ def GenerateByteArrayValue (self, StructuredPcds):
StructuredPcdsData["OBJECTS"][include_file] = os.path.getmtime(include_file)
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"))
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)
MakeApp = MakeApp + '\tcopy /y %s $@\n' % (PcdValueCommonPath)
else:
Expand Down

0 comments on commit 3e91e42

Please sign in to comment.