From nobody Mon Apr 29 03:11:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+55747+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55747+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1583920373; cv=none; d=zohomail.com; s=zohoarc; b=kcOtpnSexLnysMFHKa/XoumFmnOVLkxDSG2ymvqAJIN2pQ+pQYyyffzJbLqkJ12Yl6P65lkc4Mm+C3QSfrxjQvESMT4SBv4GJ5QLpte8tIGegP/FqLRUQETchWrmapTIx66cUzBUrMMDcdHKkHV4TlANVwBu+CI/T9rr+pNvJvc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583920373; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=P062pVRsP1H9MXivm/tdSepZWLUa1AADZhLtw4wYuDY=; b=Ow6PM7VEvYn4tDqaekHWPGTuSYBYWtd1MaA6PgIqYcihMnOF4BKHe8nkoSywOWLoiMnnhrbvgLqypKgAwzhY92uXW6ww6nrgoQZtiCsLk5Mc6B01jGIwYtyfag0wTWs2KqIWTyqqSAxFPjuPag6UbwfDLQTJee7FTaX3vGi7f0o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55747+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1583920373521516.0456177285371; Wed, 11 Mar 2020 02:52:53 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id rQj8YY1788612xp8naNAMphk; Wed, 11 Mar 2020 02:52:53 -0700 X-Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.4760.1583920372298174152 for ; Wed, 11 Mar 2020 02:52:52 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Mar 2020 02:52:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,540,1574150400"; d="scan'208";a="277311594" X-Received: from zhijufax-mobl.ccr.corp.intel.com ([10.238.4.120]) by fmsmga002.fm.intel.com with ESMTP; 11 Mar 2020 02:52:50 -0700 From: "Fan, ZhijuX" To: devel@edk2.groups.io Cc: Liming Gao , Bob Feng , "Zhiju . Fan" Subject: [edk2-devel] [PATCH V4] BaseTools:copy the common PcdValueCommon.c to output directory Date: Wed, 11 Mar 2020 17:51:21 +0800 Message-Id: <20200311095121.18788-1-zhijux.fan@intel.com> Precedence: Bulk List-Unsubscribe: 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,zhijux.fan@intel.com X-Gm-Message-State: c35RGio7xK5Y00sv5sxaoZCUx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1583920373; bh=TC1HHI1zesxIhCNEiYS+Dmmw9B9PnGHeehhIhmFvyrU=; h=Cc:Date:From:Reply-To:Subject:To; b=O1pmCws4lrNgym6H8+fj9Ins73K+ejJqa7sBgCJVaR9VtrNyEYwQetdhE43UB0Mc7R/ kBtjB4CFfp48lEH8gaDNECXU7QcMj1Eh2IEiiZUv1S3qMIEQTtCyMi5D5px00stuK9KrH OJW2ptqsjcHDmSQwnprvvqqAXNG/9mKvq3s= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2568 PcdValueInit shares the same Edk2\BaseTools\Source\C\PcdValueCommon.c. To avoid the conflict, it should copy this file to its output directory, If so, PcdValueCommon.c file will be private for PcdValueInit Cc: Liming Gao Cc: Bob Feng Signed-off-by: Zhiju.Fan Reviewed-by: Bob Feng Reviewed-by: Liming Gao --- Optimized the generated Makefile and script code '%s' % PcdValueCommonName change to PcdValueCommonName BaseTools/Source/Python/Workspace/DscBuildData.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index 476c7edaf9da..75f419c7ff1b 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -55,6 +55,7 @@ def _IsFieldValueAnArray (Value): return False =20 PcdValueInitName =3D 'PcdValueInit' +PcdValueCommonName =3D 'PcdValueCommon' =20 PcdMainCHeader =3D ''' /** @@ -2634,10 +2635,10 @@ class DscBuildData(PlatformBuildClassObject): =20 MakeApp =3D PcdMakefileHeader if sys.platform =3D=3D "win32": - MakeApp =3D MakeApp + 'APPFILE =3D %s\%s.exe\n' % (self.Output= Path, PcdValueInitName) + 'APPNAME =3D %s\n' % (PcdValueInitName) + 'OBJECT= S =3D %s\%s.obj %s.obj\n' % (self.OutputPath, PcdValueInitName, os.path.nor= mpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source/C/Commo= n/PcdValueCommon"))) + 'INC =3D ' + MakeApp =3D MakeApp + 'APPFILE =3D %s\%s.exe\n' % (self.Output= Path, PcdValueInitName) + 'APPNAME =3D %s\n' % (PcdValueInitName) + 'OBJECT= S =3D %s\%s.obj %s.obj\n' % (self.OutputPath, PcdValueInitName, os.path.joi= n(self.OutputPath, PcdValueCommonName)) + 'INC =3D ' else: MakeApp =3D MakeApp + PcdGccMakefile - MakeApp =3D MakeApp + 'APPFILE =3D %s/%s\n' % (self.OutputPath= , PcdValueInitName) + 'APPNAME =3D %s\n' % (PcdValueInitName) + 'OBJECTS = =3D %s/%s.o %s.o\n' % (self.OutputPath, PcdValueInitName, os.path.normpath(= mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source/C/Common/PcdV= alueCommon"))) + \ + MakeApp =3D MakeApp + 'APPFILE =3D %s/%s\n' % (self.OutputPath= , PcdValueInitName) + 'APPNAME =3D %s\n' % (PcdValueInitName) + 'OBJECTS = =3D %s/%s.o %s.o\n' % (self.OutputPath, PcdValueInitName, os.path.join(self= .OutputPath, PcdValueCommonName)) + \ 'include $(MAKEROOT)/Makefiles/app.makefile\n' + 'IN= CLUDE +=3D' =20 IncSearchList =3D [] @@ -2742,6 +2743,14 @@ class DscBuildData(PlatformBuildClassObject): IncFileList =3D GetDependencyList(IncludeFileFullPaths, SearchPath= List) for include_file in IncFileList: MakeApp +=3D "$(OBJECTS) : %s\n" % include_file + if sys.platform =3D=3D "win32": + PcdValueCommonPath =3D os.path.normpath(mws.join(GlobalData.gG= lobalDefines["EDK_TOOLS_PATH"], "Source\C\Common\PcdValueCommon.c")) + MakeApp =3D MakeApp + '%s\PcdValueCommon.c : %s\n' % (self.Out= putPath, PcdValueCommonPath) + MakeApp =3D MakeApp + '\tcopy /y %s $@\n' % (PcdValueCommonPat= h) + else: + PcdValueCommonPath =3D os.path.normpath(mws.join(GlobalData.gG= lobalDefines["EDK_TOOLS_PATH"], "Source/C/Common/PcdValueCommon.c")) + MakeApp =3D MakeApp + '%s/PcdValueCommon.c : %s\n' % (self.Out= putPath, PcdValueCommonPath) + MakeApp =3D MakeApp + '\tcp -f %s %s/PcdValueCommon.c\n' % (Pc= dValueCommonPath, self.OutputPath) MakeFileName =3D os.path.join(self.OutputPath, 'Makefile') MakeApp +=3D "$(OBJECTS) : %s\n" % MakeFileName SaveFileOnChange(MakeFileName, MakeApp, False) --=20 2.14.1.windows.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 (#55747): https://edk2.groups.io/g/devel/message/55747 Mute This Topic: https://groups.io/mt/71875979/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-