]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools ConvertMasmToNasm: Don't try to reconvert .nasm files
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 31 May 2016 01:48:50 +0000 (18:48 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Tue, 28 Jun 2016 20:16:53 +0000 (13:16 -0700)
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 <jordan.l.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Scripts/ConvertMasmToNasm.py

index 3c8f994fcf7c2ec3d8066e12b043b92448da186f..5b83724b3124f84eb6566efaa9da46c90d1538eb 100755 (executable)
@@ -768,7 +768,8 @@ class ConvertInfFile(CommonUtils):
                 src = self.mo.group(1)\r
                 srcExt = self.mo.group(2)\r
                 dst = os.path.splitext(src)[0] + '.nasm'\r
-                if src not in srcToDst:\r
+                fullDst = os.path.join(self.dir, dst)\r
+                if src not in srcToDst and not os.path.exists(fullDst):\r
                     srcToDst[src] = dst\r
                     srcToDst['order'].append(src)\r
         return srcToDst\r