summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2016-05-30 18:48:50 -0700
committerJordan Justen <jordan.l.justen@intel.com>2016-06-28 13:16:53 -0700
commitad00b0452e0c6cf09aecfe1b0cf64d81f191a507 (patch)
tree0d6f49b956baad0e3fc7bb89a3aefcb2f756125a /BaseTools
parent5de927b54b9f4b314ec65bd2ae1d1908ceabd423 (diff)
downloadedk2-ad00b0452e0c6cf09aecfe1b0cf64d81f191a507.tar.gz
edk2-ad00b0452e0c6cf09aecfe1b0cf64d81f191a507.tar.bz2
edk2-ad00b0452e0c6cf09aecfe1b0cf64d81f191a507.zip
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>
Diffstat (limited to 'BaseTools')
-rwxr-xr-xBaseTools/Scripts/ConvertMasmToNasm.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/BaseTools/Scripts/ConvertMasmToNasm.py b/BaseTools/Scripts/ConvertMasmToNasm.py
index 3c8f994fcf..5b83724b31 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