]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/GenMake: Use ToolDefinition as fallback option
authorPierre Gondois <Pierre.Gondois@arm.com>
Thu, 23 Sep 2021 08:59:00 +0000 (16:59 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 29 Sep 2021 14:31:37 +0000 (14:31 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3653

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>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/Python/AutoGen/GenMake.py

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