]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix a bug of genffs command generation
authorFeng, Bob C <bob.c.feng@intel.com>
Fri, 27 Sep 2019 02:30:17 +0000 (10:30 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Mon, 14 Oct 2019 01:00:10 +0000 (09:00 +0800)
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>
BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py

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