BaseTools ConvertMasmToNasm: Don't try to reconvert .nasm files

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>
This commit is contained in:
Jordan Justen
2016-05-30 18:48:50 -07:00
parent 5de927b54b
commit ad00b0452e

View File

@ -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