Bob: Can BaseTools base on make command to generate Makefile? The different make command will use the different Makefile type.
Thanks Liming >-----Original Message----- >From: Feng, Bob C >Sent: Friday, September 27, 2019 10:30 AM >To: [email protected] >Cc: Gao, Liming <[email protected]>; Feng, Bob C <[email protected]> >Subject: [Patch 1/1] 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 <[email protected]> >Signed-off-by: Bob Feng <[email protected]> >--- > 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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#48252): https://edk2.groups.io/g/devel/message/48252 Mute This Topic: https://groups.io/mt/34307097/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
