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>
# Create makefile for MS nmake and GNU make\r
#\r
# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>\r
# 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
# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
\r
\r
MakePath = AutoGenObject.BuildOption.get('MAKE', {}).get('PATH')\r
if not MakePath:\r
\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 = 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
\r
if sys.platform == "win32":\r
self._Platform = WIN32_PLATFORM\r