]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/GenMake.py
BaseTools: Remove caret in NASM_INC macro
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / GenMake.py
index f5d15c40ad3196e5ea56f375bec12c38d313c9ee..bbb3c29446f53fa7f2cb61a216a5b119f72c3fbc 100755 (executable)
@@ -612,9 +612,10 @@ cleanlib:
                 IncludePath = self._INC_FLAG_['NASM'] + self.PlaceMacro(P, self.Macros)\r
                 if IncludePath.endswith(os.sep):\r
                     IncludePath = IncludePath.rstrip(os.sep)\r
-                # When compiling .nasm files, need to add a literal backslash at each path\r
-                # To specify a literal backslash at the end of the line, precede it with a caret (^)\r
-                if P == MyAgo.IncludePathList[-1] and os.sep == '\\':\r
+                # When compiling .nasm files, need to add a literal backslash at each path.\r
+                # In nmake makfiles, a trailing literal backslash must be escaped with a caret ('^').\r
+                # It is otherwise replaced with a space (' '). This is not necessary for GNU makfefiles.\r
+                if P == MyAgo.IncludePathList[-1] and self._Platform == WIN32_PLATFORM and self._FileType == NMAKE_FILETYPE:\r
                     IncludePath = ''.join([IncludePath, '^', os.sep])\r
                 else:\r
                     IncludePath = os.path.join(IncludePath, '')\r