From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.1964.1632387550891541804 for ; Thu, 23 Sep 2021 01:59:11 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 51FA4113E; Thu, 23 Sep 2021 01:59:10 -0700 (PDT) Received: from e120189.arm.com (unknown [10.57.87.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2E81E3F59C; Thu, 23 Sep 2021 01:59:09 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Bob Feng , Liming Gao , Sami Mujawar Subject: [PATCH v1 1/4] BaseTools/GenMake: Use ToolDefinition as fallback option Date: Thu, 23 Sep 2021 09:59:00 +0100 Message-Id: <20210923085903.15966-2-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210923085903.15966-1-Pierre.Gondois@arm.com> References: <20210923085903.15966-1-Pierre.Gondois@arm.com> From: Pierre Gondois 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 --- 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.
-# Copyright (c) 2020, ARM Limited. All rights reserved.
+# Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.
# 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