From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: bob.c.feng@intel.com) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by groups.io with SMTP; Thu, 26 Sep 2019 19:31:04 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2019 19:31:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,553,1559545200"; d="scan'208";a="194336804" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga006.jf.intel.com with ESMTP; 26 Sep 2019 19:31:02 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: Liming Gao , Bob Feng Subject: [Patch 1/1] BaseTools: Fix a bug of genffs command generation Date: Fri, 27 Sep 2019 10:30:17 +0800 Message-Id: <20190927023017.20424-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Bob Feng --- BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py index 4d8b2bdee299..bd97aa9dd208 100644 --- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py +++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py @@ -11,10 +11,11 @@ # 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 from array import array @@ -484,11 +485,11 @@ class GenFdsGlobalVariable: Cmd += ("-o", Output) Cmd += Input 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 if ' '.join(Cmd).strip() not in GenFdsGlobalVariable.SecCmdList: GenFdsGlobalVariable.SecCmdList.append(' '.join(Cmd).strip()) -- 2.20.1.windows.1