BaseTools: Fix a bug of genffs command generation

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2221

The command used by multiple thread genffs feature in makefile
for testing if file exist is generated based on the toolchain family.
It should be based on the OS type.

Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Feng, Bob C 2019-09-27 10:30:17 +08:00
parent 778832bcad
commit a1f94045ff
1 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@ from __future__ import print_function
from __future__ import absolute_import
import Common.LongFilePathOs as os
import sys
from sys import stdout
from subprocess import PIPE,Popen
from struct import Struct
@ -486,7 +487,7 @@ class GenFdsGlobalVariable:
SaveFileOnChange(CommandFile, ' '.join(Cmd), False)
if IsMakefile:
if GlobalData.gGlobalDefines.get("FAMILY") == "MSFT":
if sys.platform == "win32":
Cmd = ['if', 'exist', Input[0]] + Cmd
else:
Cmd = ['-test', '-e', Input[0], "&&"] + Cmd