public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Bob Feng" <bob.c.feng@intel.com>
To: devel@edk2.groups.io
Cc: Liming Gao <liming.gao@intel.com>, Bob Feng <bob.c.feng@intel.com>
Subject: [Patch 1/1] BaseTools: Fix a bug of genffs command generation
Date: Fri, 27 Sep 2019 10:30:17 +0800	[thread overview]
Message-ID: <20190927023017.20424-1-bob.c.feng@intel.com> (raw)

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


             reply	other threads:[~2019-09-27  2:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-27  2:30 Bob Feng [this message]
2019-09-27 10:02 ` [edk2-devel] [Patch 1/1] BaseTools: Fix a bug of genffs command generation Philippe Mathieu-Daudé
2019-09-29  1:16 ` Liming Gao
2019-10-12  6:03 ` Liming Gao
2019-10-14  1:02   ` Bob Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190927023017.20424-1-bob.c.feng@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox