From nobody Sun May 19 03:12:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81021+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81021+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1632387552; cv=none; d=zohomail.com; s=zohoarc; b=WhNzYmbkYsUyx52m8p1xdYMdbq+wMXef1KXTEdJQNrpIdFDdhwuqGysTIaQP7pAsH9TvR8ocykM8ZeSuspMBLVjz4E0XaD3aENxCrxEfBLhpLu8SiKimcVtgtmKxSldPJfx984aR+2wJHQQjQnM/2/KZcaRqI0JS4pVUqwUGqLA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632387552; h=Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=RwzDRwx/LBSlPAoy0ei6fUWDvL1UJWjRboDAIEA8/Qs=; b=DA5zTqWxK7gibGdsSA6Z2T2R2sZacjEFSD7AfwNVr/hgq9e2a6N+8y+R44WvgDenyjsfongOT/sZfy54D6zCvPZI/yrFnmrLm4hBNTfi/4x2s02jh9pByVpaKF/S9iuYnLx4X8I1kZVxZ1WDXobzjKgKSTHOZzh7KdckADUxOA8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81021+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1632387552225307.36512763453084; Thu, 23 Sep 2021 01:59:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id A8Q9YY1788612x14JjNnKQTa; Thu, 23 Sep 2021 01:59:11 -0700 X-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 X-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) X-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: [edk2-devel] [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> In-Reply-To: <20210923085903.15966-1-Pierre.Gondois@arm.com> References: <20210923085903.15966-1-Pierre.Gondois@arm.com> Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: febbPzQKQLXws2cW1pjVhmWfx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1632387551; bh=6UceIWx1fYSFYcGbq2mqZSr0gxNgg5ckIZco43L6ynk=; h=Date:From:Reply-To:Subject:To; b=ofGGmFoPQJT3obAoSuoUvWVR2rCYRwq2TxzZ3bSHDAhm22EYuLv/7YPCYrrN8MH8exy AyE70eP3n9yZ34RtwBUsidCYpEtzMM3d3pCa7fH4uiP7jjySmeNffhyEFBqJl5LXbbbjH RNnZoIU2L5dqseamqcqnjGCb7ys/yDJcUGs= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1632387553810100004 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Bob Feng Reviewed-by: Chris Jones Reviewed-by: Liming Gao --- 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 # =20 @@ -177,11 +177,11 @@ class BuildFile(object): =20 MakePath =3D AutoGenObject.BuildOption.get('MAKE', {}).get('PATH') if not MakePath: - self._FileType =3D "" - elif "nmake" in MakePath: + MakePath =3D AutoGenObject.ToolDefinition.get('MAKE', {}).get(= 'PATH') + if "nmake" in MakePath: self._FileType =3D NMAKE_FILETYPE else: - self._FileType =3D "gmake" + self._FileType =3D GMAKE_FILETYPE =20 if sys.platform =3D=3D "win32": self._Platform =3D WIN32_PLATFORM --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81021): https://edk2.groups.io/g/devel/message/81021 Mute This Topic: https://groups.io/mt/85809768/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 19 03:12:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81022+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81022+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1632387553; cv=none; d=zohomail.com; s=zohoarc; b=OwscUYmOlELFSpGrqiQBut2mHSoUjEcBPtY0v4o4qvyhVvOdpzvDj5Yqo9SY1hzedjpQw7DH6yuakk8mGVHH+iyQnV6kqPXwjHB6hcJ79zUhMRNn5wOWZ0yWTjbJAw+17U+30oOzfhMFJQE+4RqQBq6rLGt3fXAIgFQqyh2mhJw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632387553; h=Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=ACIt6dSc5gjUGLrIZR3f9ewHIqSSBT8cZeWdWjNShdQ=; b=h2ryVYjgdaK0NIC3vKt+zbbQBpTwLMji3/G3bAN4tx5xhCwxZhs3zHEmVPNEEsRnvwdMX7075hTY+fFP9ko2xrcXSUmsRs7zapFxXe5v1un5G56eTw1DVM/hPiiKFpqK7Rc45Qfl8znHgkGuYTe4hAUL1bd8wXMzfi50tkV1epc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81022+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1632387553656719.1327502999247; Thu, 23 Sep 2021 01:59:13 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id dflAYY1788612xN7KQuHMZ0S; Thu, 23 Sep 2021 01:59:13 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.2045.1632387552666905992 for ; Thu, 23 Sep 2021 01:59:12 -0700 X-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 05FDC11FB; Thu, 23 Sep 2021 01:59:12 -0700 (PDT) X-Received: from e120189.arm.com (unknown [10.57.87.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B038C3F59C; Thu, 23 Sep 2021 01:59:10 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Bob Feng , Liming Gao , Sami Mujawar Subject: [edk2-devel] [PATCH v1 2/4] BaseTools/build: Set MakefileName Date: Thu, 23 Sep 2021 09:59:01 +0100 Message-Id: <20210923085903.15966-3-Pierre.Gondois@arm.com> In-Reply-To: <20210923085903.15966-1-Pierre.Gondois@arm.com> References: <20210923085903.15966-1-Pierre.Gondois@arm.com> Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: lCAdEfx0a0t7jj4CQcJzPqn1x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1632387553; bh=lz9skl8C/K58HzSyslRsMl1jWjDHvgpGy/2vQaxbuKE=; h=Date:From:Reply-To:Subject:To; b=mJJ43rSuqlge6LBF6Dp7gggdmilUzsXoLG3N4VeEescTRRETqZ7Yz3I32K9ZH/2MuRZ 9fjbJgKVs7igEIHbbqP//nm5vCHc1ZClT6xaZ8S8ozaoHY477z5mG2gBDplapu3+emZGq 1NE8UCs1wj5mdh01wKYrARq5q1A/Tt8mEHg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1632387554033100005 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois Running the following command: python3 build/build.py -a AARCH64 -t GCC5 -p ArmPlatformPkg/ArmPlatformPkg.dsc -b DEBUG libraries triggers the following error: make: *** Build/ArmPlatform/DEBUG_GCC5/AARCH64/MdePkg/Library/ BasePcdLibNull/BasePcdLibNull: Is a directory. Stop. Indeed, MakefileName is set to en empty string. Setting MakefileName resolves the error. Signed-off-by: Pierre Gondois Reviewed-by: Bob Feng Reviewed-by: Chris Jones Reviewed-by: Liming Gao --- BaseTools/Source/Python/build/build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Pyth= on/build/build.py index 02b489892422..58081361c38d 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -4,7 +4,7 @@ # Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
# Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.
-# Copyright (c) 2020, ARM Limited. All rights reserved.
+# Copyright (c) 2020 - 2021, ARM Limited. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -1308,6 +1308,9 @@ class Build(): if Target =3D=3D 'run': return True =20 + # Fetch the MakeFileName. + self.MakeFileName =3D AutoGenObject.MakeFileName + # build modules if BuildModule: BuildCommand =3D BuildCommand + [Target] --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81022): https://edk2.groups.io/g/devel/message/81022 Mute This Topic: https://groups.io/mt/85809772/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 19 03:12:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81023+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81023+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1632387555; cv=none; d=zohomail.com; s=zohoarc; b=ToETMTOynWGe8iW4QlxFPyZBADwTe71KRUyVJeKKBQ8uCxusizFzcCUVdcgitZqz1Y+Vmd5K5ecERbBhNa2Eaubvrw4GN1zAj3VVg0ReMlHeMlJLAQwdgwRotb+RmrOw/MlYijR2DSdrbGOZcfuk105ALfy6gaT3ZCNBMfydIaQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632387555; h=Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=L4KGn7Yvb3JoEYoe+nbfquQ4MiYNH6EajiHPunI4a+s=; b=QZP7N5qBN8f43fhxLZjJrYlWKSLWl2WysyV1irxbpC8R7K9s4CqaGTmaMqhtpW71GmZVrWKS3yHTI3pvr6/yCWJ51REOUU71mDY/4C92a/D0Fku4ndRGFWq+/wdFKEGHbtwUEmqcH4aHav1hh59QQxHkYHFFoJSY2iOg4+EhvNg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81023+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1632387555008538.1062505108013; Thu, 23 Sep 2021 01:59:15 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id xTNcYY1788612xKWcOaspZnk; Thu, 23 Sep 2021 01:59:14 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.1966.1632387554027835248 for ; Thu, 23 Sep 2021 01:59:14 -0700 X-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 9663312FC; Thu, 23 Sep 2021 01:59:13 -0700 (PDT) X-Received: from e120189.arm.com (unknown [10.57.87.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5B59B3F59C; Thu, 23 Sep 2021 01:59:12 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Bob Feng , Liming Gao , Sami Mujawar Subject: [edk2-devel] [PATCH v1 3/4] BaseTools: Remove Makefile/MakefileName fields Date: Thu, 23 Sep 2021 09:59:02 +0100 Message-Id: <20210923085903.15966-4-Pierre.Gondois@arm.com> In-Reply-To: <20210923085903.15966-1-Pierre.Gondois@arm.com> References: <20210923085903.15966-1-Pierre.Gondois@arm.com> Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: QnpyqTa3j3inJWQI8JYoqdy3x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1632387554; bh=kur5la/I76iI+qSUuGbFxSfO8HAHR7Y6Eyjl/Hbrcwc=; h=Date:From:Reply-To:Subject:To; b=da4mkxzVmBdlku2Bl8MbOfzeO4z5/BY4nvf5rf749jWFpyZ/tO5zIOtNLM++WTD9uL2 Y+jDghPlNmTCk06iHsuIH6QkzpWjWJNgQj3Y8GgF9Uy8orF+Le2KewuAUjoMZ+dYPE+7I O1UZKH/2axM1K3JbOIRQRJ9nVxvozxI1fkE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1632387556212100014 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois The Makefile and MakefilName fields are never set/used. Remove them. To check this, the following commands can be used: - grep -rIn "\.Makefile" - grep -rIn "\.MakefileName" Signed-off-by: Pierre Gondois Reviewed-by: Bob Feng Reviewed-by: Chris Jones Reviewed-by: Liming Gao --- BaseTools/Source/Python/AutoGen/ModuleAutoGen.py | 1 - BaseTools/Source/Python/Workspace/BuildClassObject.py | 2 -- BaseTools/Source/Python/build/build.py | 2 -- 3 files changed, 5 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTools/S= ource/Python/AutoGen/ModuleAutoGen.py index d70b0d7ae828..368a31047e82 100755 --- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py @@ -254,7 +254,6 @@ class ModuleAutoGen(AutoGen): self.AutoGenDepSet =3D set() self.ReferenceModules =3D [] self.ConstPcd =3D {} - self.Makefile =3D None self.FileDependCache =3D {} =20 def __init_platform_info__(self): diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/BaseTo= ols/Source/Python/Workspace/BuildClassObject.py index 88a1d1582cd8..ef873720f455 100644 --- a/BaseTools/Source/Python/Workspace/BuildClassObject.py +++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py @@ -590,7 +590,6 @@ class PackageBuildClassObject(BuildData): # @var OutputDirectory: To store value for OutputDirectory # @var FlashDefinition: To store value for FlashDefinition # @var BuildNumber: To store value for BuildNumber -# @var MakefileName: To store value for MakefileName # @var SkuIds: To store value for SkuIds, it is a set structure= as # { 'SkuName' : SkuId, '!include' : includefilenam= e, ...} # @var Modules: To store value for Modules, it is a list structu= re as @@ -614,7 +613,6 @@ class PlatformBuildClassObject(BuildData): self.OutputDirectory =3D '' self.FlashDefinition =3D '' self.BuildNumber =3D '' - self.MakefileName =3D '' =20 self.SkuIds =3D {} self.Modules =3D [] diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Pyth= on/build/build.py index 58081361c38d..e4969d863f6e 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -2186,8 +2186,6 @@ class Build(): Pa.CreateLibModuelDirs() # Fetch the MakeFileName. self.MakeFileName =3D Pa.MakeFileName - if not self.MakeFileName: - self.MakeFileName =3D Pa.MakeFile =20 Pa.DataPipe.DataContainer =3D {"LibraryBuildDirectoryList":Pa.= LibraryBuildDirectoryList} Pa.DataPipe.DataContainer =3D {"ModuleBuildDirectoryList":Pa.M= oduleBuildDirectoryList} --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81023): https://edk2.groups.io/g/devel/message/81023 Mute This Topic: https://groups.io/mt/85809773/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 19 03:12:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81024+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81024+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1632387556; cv=none; d=zohomail.com; s=zohoarc; b=n78coB8BFeNjj+689ZG8vrYmZ0oy2EotBI8p3nUnAy5pZ6jT+5diEeqibJjwE38BDXWHlpomr/2WXf70Udgwnlst4HkHyd3g1BXG7XXN9DqJV2h6C7RkZ70eSFJZ96ldnwJ9UZ0YIR7WlX6CgBt5XcNUD23wWBtIWKzIiqqzvC0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632387556; h=Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=9yqa6tPv3oNEPsHsOsBDux3G9JPtj1TslKSoXWZyWho=; b=aIe0oDC8F3TF4SyBnRk/jJHzWX5zgu8Lcu8YpIPF73quUEdTRRHTRL+iHo8KXspt4xCEkN6i5JRbJ6u3ulsw1gh/FLOTUs6Tnl82/bM6dUREAgQH/ZR783adZdzTjyyLqywtV9/xcTiPBewowC7ARFXGYtYgGQV5B/7jDvvTvdg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81024+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 163238755644649.571253061073776; Thu, 23 Sep 2021 01:59:16 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id za6DYY1788612x26F4hQvjxh; Thu, 23 Sep 2021 01:59:16 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.1940.1632387555548849866 for ; Thu, 23 Sep 2021 01:59:15 -0700 X-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 3C817113E; Thu, 23 Sep 2021 01:59:15 -0700 (PDT) X-Received: from e120189.arm.com (unknown [10.57.87.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0252C3F59C; Thu, 23 Sep 2021 01:59:13 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Bob Feng , Liming Gao , Sami Mujawar Subject: [edk2-devel] [PATCH v1 4/4] BaseTools: Remove hard-coded strings for target and tools_def Date: Thu, 23 Sep 2021 09:59:03 +0100 Message-Id: <20210923085903.15966-5-Pierre.Gondois@arm.com> In-Reply-To: <20210923085903.15966-1-Pierre.Gondois@arm.com> References: <20210923085903.15966-1-Pierre.Gondois@arm.com> Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: t9VDZabHp5lIYEDjpn9xwLptx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1632387556; bh=//JrEeLTP0xcPazH4CUj+tvFbE846VjvXv46cbBFbSM=; h=Date:From:Reply-To:Subject:To; b=jDVWBHg7inQnuMYeWSUZkfJ5abeufyX59VZIqAih6sxctedWnto2ADCOpdLnpXxPtn2 UzBJ5DJ7U6zs3syn2iIVbrYI5jU5Sno4YgVTj0UPC073q1yQXbqKCsUbtwoQZWfuX6AwH pOe6KZQqhP/M2Yi0MPjI+vlxj+8anReBkdQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1632387558233100017 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois The "target.txt" and "tools_def.txt" filenames are hard-coded at some places when global definitions are available at: BaseTools/Source/Python/Common/TargetTxtClassObject.py: DefaultTargetTxtFile and BaseTools/Source/Python/Common/ToolDefClassObject.py: DefaultToolsDefFile Use these global definitions instead. Also remove the unused gBuildConfiguration and gToolsDefinition variables from build.py Signed-off-by: Pierre Gondois Reviewed-by: Bob Feng Reviewed-by: Chris Jones Reviewed-by: Liming Gao --- BaseTools/Source/Python/GenFds/GenFds.py | 4 ++-- BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 4 ++-- BaseTools/Source/Python/TargetTool/TargetTool.py | 3 ++- BaseTools/Source/Python/Workspace/DscBuildData.py | 9 ++++----- BaseTools/Source/Python/build/build.py | 4 ---- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Py= thon/GenFds/GenFds.py index ae3e776a5540..c34104500059 100644 --- a/BaseTools/Source/Python/GenFds/GenFds.py +++ b/BaseTools/Source/Python/GenFds/GenFds.py @@ -20,7 +20,7 @@ from linecache import getlines from io import BytesIO =20 import Common.LongFilePathOs as os -from Common.TargetTxtClassObject import TargetTxtDict +from Common.TargetTxtClassObject import TargetTxtDict,gDefaultTargetTxtFile from Common.DataType import * import Common.GlobalData as GlobalData from Common import EdkLogger @@ -207,7 +207,7 @@ def GenFdsApi(FdsCommandDict, WorkSpaceDataBase=3DNone): GenFdsGlobalVariable.ConfDir =3D ConfDirectoryPath if not GlobalData.gConfDirectory: GlobalData.gConfDirectory =3D GenFdsGlobalVariable.ConfDir - BuildConfigurationFile =3D os.path.normpath(os.path.join(ConfDirec= toryPath, "target.txt")) + BuildConfigurationFile =3D os.path.normpath(os.path.join(ConfDirec= toryPath, gDefaultTargetTxtFile)) if os.path.isfile(BuildConfigurationFile) =3D=3D True: # if no build target given in command line, get it from target= .txt TargetObj =3D TargetTxtDict() diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseT= ools/Source/Python/GenFds/GenFdsGlobalVariable.py index 25f9d54874d3..d7668ba681aa 100644 --- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py +++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py @@ -24,7 +24,7 @@ from Common import EdkLogger from Common.Misc import SaveFileOnChange =20 from Common.TargetTxtClassObject import TargetTxtDict -from Common.ToolDefClassObject import ToolDefDict +from Common.ToolDefClassObject import ToolDefDict,gDefaultToolsDefFile from AutoGen.BuildEngine import ToolBuildRule import Common.DataType as DataType from Common.Misc import PathClass,CreateDirectory @@ -103,7 +103,7 @@ class GenFdsGlobalVariable: TargetObj =3D TargetTxtDict() ToolDefinitionFile =3D TargetObj.Target.TargetTxtDictionary[DataTy= pe.TAB_TAT_DEFINES_TOOL_CHAIN_CONF] if ToolDefinitionFile =3D=3D '': - ToolDefinitionFile =3D "Conf/tools_def.txt" + ToolDefinitionFile =3D os.path.join('Conf', gDefaultToolsDefF= ile) if os.path.isfile(ToolDefinitionFile): ToolDefObj =3D ToolDefDict((os.path.join(os.getenv("WORKSPACE"= ), "Conf"))) ToolDefinition =3D ToolDefObj.ToolDef.ToolsDefTxtDatabase diff --git a/BaseTools/Source/Python/TargetTool/TargetTool.py b/BaseTools/S= ource/Python/TargetTool/TargetTool.py index 71222e3cc899..7f2479f0f0ac 100644 --- a/BaseTools/Source/Python/TargetTool/TargetTool.py +++ b/BaseTools/Source/Python/TargetTool/TargetTool.py @@ -17,6 +17,7 @@ import Common.BuildToolError as BuildToolError from Common.DataType import * from Common.BuildVersion import gBUILD_VERSION from Common.LongFilePathSupport import OpenLongFilePath as open +from Common.TargetTxtClassObject import gDefaultTargetTxtFile =20 # To Do 1.set clean, 2. add item, if the line is disabled. =20 @@ -25,7 +26,7 @@ class TargetTool(): self.WorkSpace =3D os.path.normpath(os.getenv('WORKSPACE')) self.Opt =3D opt self.Arg =3D args[0] - self.FileName =3D os.path.normpath(os.path.join(self.WorkSpace, '= Conf', 'target.txt')) + self.FileName =3D os.path.normpath(os.path.join(self.WorkSpace, '= Conf', gDefaultTargetTxtFile)) if os.path.isfile(self.FileName) =3D=3D False: print("%s does not exist." % self.FileName) sys.exit(1) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index 4d5b1ad4d90a..d1ee0ccaea7e 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -19,8 +19,8 @@ from Common.Misc import * from types import * from Common.Expression import * from CommonDataClass.CommonClass import SkuInfoClass -from Common.TargetTxtClassObject import TargetTxtDict -from Common.ToolDefClassObject import ToolDefDict +from Common.TargetTxtClassObject import TargetTxtDict,gDefaultTargetTxtFile +from Common.ToolDefClassObject import ToolDefDict,gDefaultToolsDefFile from .MetaDataTable import * from .MetaFileTable import * from .MetaFileParser import * @@ -3526,12 +3526,11 @@ class DscBuildData(PlatformBuildClassObject): self._ToolChainFamily =3D TAB_COMPILER_MSFT TargetObj =3D TargetTxtDict() TargetTxt =3D TargetObj.Target - BuildConfigurationFile =3D os.path.normpath(os.path.join(GlobalDat= a.gConfDirectory, "target.txt")) + BuildConfigurationFile =3D os.path.normpath(os.path.join(GlobalDat= a.gConfDirectory, gDefaultTargetTxtFile)) if os.path.isfile(BuildConfigurationFile) =3D=3D True: ToolDefinitionFile =3D TargetTxt.TargetTxtDictionary[DataType.= TAB_TAT_DEFINES_TOOL_CHAIN_CONF] if ToolDefinitionFile =3D=3D '': - ToolDefinitionFile =3D "tools_def.txt" - ToolDefinitionFile =3D os.path.normpath(mws.join(self.Work= spaceDir, 'Conf', ToolDefinitionFile)) + ToolDefinitionFile =3D os.path.normpath(mws.join(self.Work= spaceDir, 'Conf', gDefaultToolsDefFile)) if os.path.isfile(ToolDefinitionFile) =3D=3D True: ToolDefObj =3D ToolDefDict((os.path.join(os.getenv("WORKSP= ACE"), "Conf"))) ToolDefinition =3D ToolDefObj.ToolDef.ToolsDefTxtDatabase diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Pyth= on/build/build.py index e4969d863f6e..07187c03618a 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -67,10 +67,6 @@ from AutoGen.AutoGen import CalculatePriorityValue ## standard targets of build command gSupportedTarget =3D ['all', 'genc', 'genmake', 'modules', 'libraries', 'f= ds', 'clean', 'cleanall', 'cleanlib', 'run'] =20 -## build configuration file -gBuildConfiguration =3D "target.txt" -gToolsDefinition =3D "tools_def.txt" - TemporaryTablePattern =3D re.compile(r'^_\d+_\d+_[a-fA-F0-9]+$') TmpTableDict =3D {} =20 --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81024): https://edk2.groups.io/g/devel/message/81024 Mute This Topic: https://groups.io/mt/85809775/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-