We now check to see if the destination .nasm file already exists. If
it does, then we don't try to convert the .asm to .nasm.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <[email protected]>
Cc: Yonghong Zhu <[email protected]>
Cc: Liming Gao <[email protected]>
---
 BaseTools/Scripts/ConvertMasmToNasm.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Scripts/ConvertMasmToNasm.py 
b/BaseTools/Scripts/ConvertMasmToNasm.py
index 3c8f994..5b83724 100755
--- a/BaseTools/Scripts/ConvertMasmToNasm.py
+++ b/BaseTools/Scripts/ConvertMasmToNasm.py
@@ -768,7 +768,8 @@ class ConvertInfFile(CommonUtils):
                 src = self.mo.group(1)
                 srcExt = self.mo.group(2)
                 dst = os.path.splitext(src)[0] + '.nasm'
-                if src not in srcToDst:
+                fullDst = os.path.join(self.dir, dst)
+                if src not in srcToDst and not os.path.exists(fullDst):
                     srcToDst[src] = dst
                     srcToDst['order'].append(src)
         return srcToDst
-- 
2.8.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to