public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io, Bob Feng <bob.c.feng@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Sami Mujawar <sami.mujawar@arm.com>
Subject: [PATCH v1 1/4] BaseTools/GenMake: Use ToolDefinition as fallback option
Date: Thu, 23 Sep 2021 09:59:00 +0100	[thread overview]
Message-ID: <20210923085903.15966-2-Pierre.Gondois@arm.com> (raw)
In-Reply-To: <20210923085903.15966-1-Pierre.Gondois@arm.com>

From: Pierre Gondois <Pierre.Gondois@arm.com>

Use the value set in tools_def.txt when the makefile type is
not explicitly set via BuildOption. This allows to have a
valid default makefile name instead of an empty string.

Also use GMAKE_FILETYPE instead of hard-coded "gmake".

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
---
 BaseTools/Source/Python/AutoGen/GenMake.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py
index 961b2ab1c399..e55efff059f9 100755
--- a/BaseTools/Source/Python/AutoGen/GenMake.py
+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
@@ -2,7 +2,7 @@
 # Create makefile for MS nmake and GNU make
 #
 # Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
-# Copyright (c) 2020, ARM Limited. All rights reserved.<BR>
+# Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.<BR>
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 
@@ -177,11 +177,11 @@ class BuildFile(object):
 
         MakePath = AutoGenObject.BuildOption.get('MAKE', {}).get('PATH')
         if not MakePath:
-            self._FileType = ""
-        elif "nmake" in MakePath:
+            MakePath = AutoGenObject.ToolDefinition.get('MAKE', {}).get('PATH')
+        if "nmake" in MakePath:
             self._FileType = NMAKE_FILETYPE
         else:
-            self._FileType = "gmake"
+            self._FileType = GMAKE_FILETYPE
 
         if sys.platform == "win32":
             self._Platform = WIN32_PLATFORM
-- 
2.17.1


  reply	other threads:[~2021-09-23  8:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-23  8:58 [PATCH v1 0/4] Set default Makefile name PierreGondois
2021-09-23  8:59 ` PierreGondois [this message]
2021-09-23  8:59 ` [PATCH v1 2/4] BaseTools/build: Set MakefileName PierreGondois
2021-09-23  8:59 ` [PATCH v1 3/4] BaseTools: Remove Makefile/MakefileName fields PierreGondois
2021-09-23  8:59 ` [PATCH v1 4/4] BaseTools: Remove hard-coded strings for target and tools_def PierreGondois
2021-09-23 10:05 ` [edk2-devel] [PATCH v1 0/4] Set default Makefile name Chris Jones
2021-09-24  0:48 ` 回复: " gaoliming
2021-09-24 11:57   ` PierreGondois
2021-09-29  1:35     ` 回复: [edk2-devel] " gaoliming
2021-09-29 11:43 ` Bob Feng
     [not found] ` <16A94849D004DAA5.16095@groups.io>
2021-09-29 11:53   ` [edk2-devel] " 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=20210923085903.15966-2-Pierre.Gondois@arm.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