From nobody Fri May 3 07:02:25 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1501781436266736.7180940900274; Thu, 3 Aug 2017 10:30:36 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 907A921C9127E; Thu, 3 Aug 2017 10:28:20 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 227B421C9125D for ; Thu, 3 Aug 2017 10:28:19 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 03 Aug 2017 10:30:30 -0700 Received: from mdkinney-mobl1.amr.corp.intel.com ([10.254.75.199]) by fmsmga006.fm.intel.com with ESMTP; 03 Aug 2017 10:30:30 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,317,1498546800"; d="scan'208";a="135756525" From: Michael D Kinney To: edk2-devel@lists.01.org Date: Thu, 3 Aug 2017 10:30:21 -0700 Message-Id: <20170803173023.2452-2-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.13.1.windows.2 In-Reply-To: <20170803173023.2452-1-michael.d.kinney@intel.com> References: <20170803173023.2452-1-michael.d.kinney@intel.com> Subject: [edk2] [RFC Patch 1/3] BaseTools/build: Expand PREBUILD/POSTBUILD DSC actions X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Kinney , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" * Extend PREBUILD/POSTBUILD define values to support more than one argument. * Delay normalization of PREBUILD/POSTBUILD define values until all arguments in the define values can be processed. * Convert PREBUILD/POSTBUILD build define value arguments that are WORKSPACE or PACKAGES_PATH relative paths to absolute paths. * Append -p PlatformFile, --conf=3DConfDirectory, and build target flags to command line used to execute PREBUILD/POSTBUILD actions. * Remove PrebuildScript and PostbuildScript fields from the Build class and use Prebuild and Postbuild fields instead. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney --- .../Source/Python/Workspace/WorkspaceDatabase.py | 4 +- BaseTools/Source/Python/build/build.py | 108 +++++++++++++++--= ---- 2 files changed, 82 insertions(+), 30 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseT= ools/Source/Python/Workspace/WorkspaceDatabase.py index 73b3fe7134..fe2c7c17c4 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py @@ -237,7 +237,7 @@ class DscBuildData(PlatformBuildClassObject): EdkLogger.error('build', FORMAT_INVALID, 'Missing = double quotes in the end of %s statement.' % TAB_DSC_PREBUILD, File=3Dself.MetaFile, Line=3DRecord[-1= ]) PrebuildValue =3D Record[2][1:-1] - self._Prebuild =3D PathClass(NormPath(PrebuildValue, self.= _Macros), GlobalData.gWorkspace) + self._Prebuild =3D PrebuildValue elif Name =3D=3D TAB_DSC_POSTBUILD: PostbuildValue =3D Record[2] if Record[2][0] =3D=3D '"': @@ -245,7 +245,7 @@ class DscBuildData(PlatformBuildClassObject): EdkLogger.error('build', FORMAT_INVALID, 'Missing = double quotes in the end of %s statement.' % TAB_DSC_POSTBUILD, File=3Dself.MetaFile, Line=3DRecord[-1= ]) PostbuildValue =3D Record[2][1:-1] - self._Postbuild =3D PathClass(NormPath(PostbuildValue, sel= f._Macros), GlobalData.gWorkspace) + self._Postbuild =3D PostbuildValue elif Name =3D=3D TAB_DSC_DEFINES_SUPPORTED_ARCHITECTURES: self._SupArchList =3D GetSplitValueList(Record[2], TAB_VAL= UE_SPLIT) elif Name =3D=3D TAB_DSC_DEFINES_BUILD_TARGETS: diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Pyth= on/build/build.py index 4d05ee2761..7436453582 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -796,8 +796,6 @@ class Build(): self.BuildModules =3D [] self.Db_Flag =3D False self.LaunchPrebuildFlag =3D False - self.PrebuildScript =3D '' - self.PostbuildScript =3D '' self.PlatformBuildPath =3D os.path.join(GlobalData.gConfDirectory,= '.cache', '.PlatformBuild') if BuildOptions.CommandLength: GlobalData.gCommandMaxLength =3D BuildOptions.CommandLength @@ -819,11 +817,11 @@ class Build(): EdkLogger.quiet("%-16s =3D %s" % ("CONF_PATH", GlobalData.gConfDir= ectory)) self.InitPreBuild() self.InitPostBuild() - if self.PrebuildScript: - EdkLogger.quiet("%-16s =3D %s" % ("PREBUILD", self.PrebuildScr= ipt)) - if self.PostbuildScript: - EdkLogger.quiet("%-16s =3D %s" % ("POSTBUILD", self.PostbuildS= cript)) - if self.PrebuildScript: + if self.Prebuild: + EdkLogger.quiet("%-16s =3D %s" % ("PREBUILD", self.Prebuild)) + if self.Postbuild: + EdkLogger.quiet("%-16s =3D %s" % ("POSTBUILD", self.Postbuild)) + if self.Prebuild: self.LaunchPrebuild() self.TargetTxt =3D TargetTxtClassObject() self.ToolDef =3D ToolDefClassObject() @@ -964,16 +962,37 @@ class Build(): Platform =3D self.Db._MapPlatform(str(self.PlatformFile)) self.Prebuild =3D str(Platform.Prebuild) if self.Prebuild: - PrebuildList =3D self.Prebuild.split() - if not os.path.isabs(PrebuildList[0]): - PrebuildList[0] =3D mws.join(self.WorkspaceDir, PrebuildLi= st[0]) - if os.path.isfile(PrebuildList[0]): - self.PrebuildScript =3D PrebuildList[0] - self.Prebuild =3D ' '.join(PrebuildList) - self.Prebuild +=3D self.PassCommandOption(self.BuildTarget= List, self.ArchList, self.ToolChainList) - #self.LaunchPrebuild() - else: - EdkLogger.error("Prebuild", PREBUILD_ERROR, "the prebuild = script %s is not exist.\n If you'd like to disable the Prebuild process, pl= ease use the format: -D PREBUILD=3D\"\" " %(PrebuildList[0])) + PrebuildList =3D [] + # + # Evaluate all arguments and convert arguments that are WORKSP= ACE + # relative paths to absolute paths. Filter arguments that loo= k like + # flags or do not follow the file/dir naming rules to avoid fa= lse + # positives on this conversion. + # + for Arg in self.Prebuild.split(): + # + # Do not modify Arg if it looks like a flag or an absolute= file path + # + if Arg.startswith('-') or os.path.isabs(Arg): + PrebuildList.append(Arg) + continue + # + # Do not modify Arg if it does not look like a Workspace r= elative + # path that starts with a valid package directory name + # + if not Arg[0].isalpha() or os.path.dirname(Arg) =3D=3D '': + PrebuildList.append(Arg) + continue + # + # If Arg looks like a WORKSPACE relative path, then conver= t to an + # absolute path and check to see if the file exists. + # + Temp =3D mws.join(self.WorkspaceDir, Arg) + if os.path.isfile(Temp): + Arg =3D Temp + PrebuildList.append(Arg) + self.Prebuild =3D ' '.join(PrebuildList) + self.Prebuild +=3D self.PassCommandOption(self.BuildTargetList= , self.ArchList, self.ToolChainList, self.PlatformFile, self.Target) =20 def InitPostBuild(self): if 'POSTBUILD' in GlobalData.gCommandLineDefines.keys(): @@ -982,23 +1001,46 @@ class Build(): Platform =3D self.Db._MapPlatform(str(self.PlatformFile)) self.Postbuild =3D str(Platform.Postbuild) if self.Postbuild: - PostbuildList =3D self.Postbuild.split() - if not os.path.isabs(PostbuildList[0]): - PostbuildList[0] =3D mws.join(self.WorkspaceDir, Postbuild= List[0]) - if os.path.isfile(PostbuildList[0]): - self.PostbuildScript =3D PostbuildList[0] - self.Postbuild =3D ' '.join(PostbuildList) - self.Postbuild +=3D self.PassCommandOption(self.BuildTarge= tList, self.ArchList, self.ToolChainList) - else: - EdkLogger.error("Postbuild", POSTBUILD_ERROR, "the postbui= ld script %s is not exist.\n If you'd like to disable the Postbuild process= , please use the format: -D POSTBUILD=3D\"\" " %(PostbuildList[0])) - - def PassCommandOption(self, BuildTarget, TargetArch, ToolChain): + PostbuildList =3D [] + # + # Evaluate all arguments and convert arguments that are WORKSP= ACE + # relative paths to absolute paths. Filter arguments that loo= k like + # flags or do not follow the file/dir naming rules to avoid fa= lse + # positives on this conversion. + # + for Arg in self.Postbuild.split(): + # + # Do not modify Arg if it looks like a flag or an absolute= file path + # + if Arg.startswith('-') or os.path.isabs(Arg): + PostbuildList.append(Arg) + continue + # + # Do not modify Arg if it does not look like a Workspace r= elative + # path that starts with a valid package directory name + # + if not Arg[0].isalpha() or os.path.dirname(Arg) =3D=3D '': + PostbuildList.append(Arg) + continue + # + # If Arg looks like a WORKSPACE relative path, then conver= t to an + # absolute path and check to see if the file exists. + # + Temp =3D mws.join(self.WorkspaceDir, Arg) + if os.path.isfile(Temp): + Arg =3D Temp + PostbuildList.append(Arg) + self.Postbuild =3D ' '.join(PostbuildList) + self.Postbuild +=3D self.PassCommandOption(self.BuildTargetLis= t, self.ArchList, self.ToolChainList, self.PlatformFile, self.Target) + + def PassCommandOption(self, BuildTarget, TargetArch, ToolChain, Platfo= rmFile, Target): BuildStr =3D '' if GlobalData.gCommand and isinstance(GlobalData.gCommand, list): BuildStr +=3D ' ' + ' '.join(GlobalData.gCommand) TargetFlag =3D False ArchFlag =3D False ToolChainFlag =3D False + PlatformFileFlag =3D False =20 if GlobalData.gOptions and not GlobalData.gOptions.BuildTarget: TargetFlag =3D True @@ -1006,6 +1048,8 @@ class Build(): ArchFlag =3D True if GlobalData.gOptions and not GlobalData.gOptions.ToolChain: ToolChainFlag =3D True + if GlobalData.gOptions and not GlobalData.gOptions.PlatformFile: + PlatformFileFlag =3D True =20 if TargetFlag and BuildTarget: if isinstance(BuildTarget, list) or isinstance(BuildTarget, tu= ple): @@ -1022,6 +1066,14 @@ class Build(): BuildStr +=3D ' -t ' + ' -t '.join(ToolChain) elif isinstance(ToolChain, str): BuildStr +=3D ' -t ' + ToolChain + if PlatformFileFlag and PlatformFile: + if isinstance(PlatformFile, list) or isinstance(PlatformFile, = tuple): + BuildStr +=3D ' -p ' + ' -p '.join(PlatformFile) + elif isinstance(PlatformFile, str): + BuildStr +=3D ' -p' + PlatformFile + BuildStr +=3D ' --conf=3D' + GlobalData.gConfDirectory + if Target: + BuildStr +=3D ' ' + Target =20 return BuildStr =20 --=20 2.13.1.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Fri May 3 07:02:25 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1501781444298224.71541073552794; Thu, 3 Aug 2017 10:30:44 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D0A4F21CE7490; Thu, 3 Aug 2017 10:28:30 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 103DC21C9126D for ; Thu, 3 Aug 2017 10:28:29 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 03 Aug 2017 10:30:40 -0700 Received: from mdkinney-mobl1.amr.corp.intel.com ([10.254.75.199]) by fmsmga006.fm.intel.com with ESMTP; 03 Aug 2017 10:30:30 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,317,1498546800"; d="scan'208";a="135756576" From: Michael D Kinney To: edk2-devel@lists.01.org Date: Thu, 3 Aug 2017 10:30:22 -0700 Message-Id: <20170803173023.2452-3-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.13.1.windows.2 In-Reply-To: <20170803173023.2452-1-michael.d.kinney@intel.com> References: <20170803173023.2452-1-michael.d.kinney@intel.com> Subject: [edk2] [RFC Patch 2/3] BaseTools/Scripts: Add python script to run a makefile X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Kinney , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add the python script RunMakefile.py that can be used in a PREBUILD/POSTBUIILD action to invoke a makefile passing in context as makefile defines. The command line arguments passed into RunMakefile.py are converted to the following set of defines. * ACTIVE_PLATFORM * TARGET_ARCH * TOOL_CHAIN_TAG * CONF_DIRECTORY * TARGET * EXTRA_FLAGS In addition, a makefile can access the system environment variables including WORKSPACE and PACKAGES_PATH. The makefile target from the following set is also passed into the makefile. If no target is passed into build, then the 'all' target is used. [all|fds|genc|genmake|clean|cleanall|cleanlib|modules|libraries|run] A platform DSC file can use a statements in the [Defines] section of the following form to use this script. MAKEFILE is a WORKSPACE or PACKAGES_PATH relative path to the makefile to run. [Defines] PREBUILD =3D python BaseTools/Script/RunMakefile.py --makefile MAKEFILE POSTBUILD =3D python BaseTools/Script/RunMakefile.py --makefile MAKEFILE Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney --- BaseTools/Scripts/RunMakefile.py | 178 +++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 178 insertions(+) create mode 100644 BaseTools/Scripts/RunMakefile.py diff --git a/BaseTools/Scripts/RunMakefile.py b/BaseTools/Scripts/RunMakefi= le.py new file mode 100644 index 0000000000..48bc198c76 --- /dev/null +++ b/BaseTools/Scripts/RunMakefile.py @@ -0,0 +1,178 @@ +## @file +# Run a makefile as part of a PREBUILD or POSTBUILD action. +# +# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BS= D License +# which accompanies this distribution. The full text of the license may b= e found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. +# + +''' +RunMakefile.py +''' + +import os +import sys +import argparse +import subprocess + +# +# Globals for help information +# +__prog__ =3D 'RunMakefile' +__version__ =3D '%s Version %s' % (__prog__, '1.0') +__copyright__ =3D 'Copyright (c) 2017, Intel Corporation. All rights res= erved.' +__description__ =3D 'Run a makefile as part of a PREBUILD or POSTBUILD act= ion.\n' + +# +# Globals +# +gArgs =3D None + +def Log(Message): + if not gArgs.Verbose: + return + sys.stdout.write (__prog__ + ': ' + Message + '\n') + +def Error(Message, ExitValue=3D1): + sys.stderr.write (__prog__ + ': ERROR: ' + Message + '\n') + sys.exit (ExitValue) + +def RelativePath(target): + return os.path.relpath (target, gWorkspace) + +def NormalizePath(target): + if isinstance(target, tuple): + return os.path.normpath (os.path.join (*target)) + else: + return os.path.normpath (target) + +if __name__ =3D=3D '__main__': + # + # Create command line argument parser object + # + parser =3D argparse.ArgumentParser ( + prog =3D __prog__, + version =3D __version__, + description =3D __description__ + __copyright__, + conflict_handler =3D 'resolve' + ) + parser.add_argument ( + '-a', '--arch', dest =3D 'Arch', nargs =3D '+', action =3D 'app= end', + required =3D True, + help =3D '''ARCHS is one of list: IA32, X64, IPF, ARM, AARCH64 = or EBC, + which overrides target.txt's TARGET_ARCH definition. = To + specify more archs, please repeat this option.''' + ) + parser.add_argument ( + '-t', '--tagname', dest =3D 'ToolChain', required =3D True, + help =3D '''Using the Tool Chain Tagname to build the platform, + overriding target.txt's TOOL_CHAIN_TAG definition.''' + ) + parser.add_argument ( + '-p', '--platform', dest =3D 'PlatformFile', required =3D True, + help =3D '''Build the platform specified by the DSC file name a= rgument, + overriding target.txt's ACTIVE_PLATFORM definition.''' + ) + parser.add_argument ( + '-b', '--buildtarget', dest =3D 'BuildTarget', required =3D Tru= e, + help =3D '''Using the TARGET to build the platform, overriding + target.txt's TARGET definition.''' + ) + parser.add_argument ( + '--conf=3D', dest =3D 'ConfDirectory', required =3D True, + help =3D '''Specify the customized Conf directory.''' + ) + parser.add_argument ( + '-D', '--define', dest =3D 'Define', nargs=3D'*', action =3D 'a= ppend', + help =3D '''Macro: "Name [=3D Value]".''' + ) + parser.add_argument ( + '--makefile', dest =3D 'Makefile', required =3D True, + help =3D '''Makefile to run passing in arguments as makefile de= fines.''' + ) + parser.add_argument ( + '-v', '--verbose', dest =3D 'Verbose', action =3D 'store_true', + help =3D '''Turn on verbose output with informational messages = printed''' + ) + + # + # Parse command line arguments + # + gArgs, remaining =3D parser.parse_known_args() + gArgs.BuildType =3D 'all' + for BuildType in ['all', 'fds', 'genc', 'genmake', 'clean', 'cleanall', = 'modules', 'libraries', 'run']: + if BuildType in remaining: + gArgs.BuildType =3D BuildType + remaining.remove(BuildType) + break + gArgs.Remaining =3D ' '.join(remaining) + + # + # Start + # + Log ('Start') + + # + # Find makefile in WORKSPACE or PACKAGES_PATH + # + PathList =3D [''] + try: + PathList.append(os.environ['WORKSPACE']) + except: + Error ('WORKSPACE environment variable not set') + try: + PathList +=3D os.environ['PACKAGES_PATH'].split(os.pathsep) + except: + pass + for Path in PathList: + Makefile =3D NormalizePath((Path, gArgs.Makefile)) + if os.path.exists (Makefile): + break + if not os.path.exists(Makefile): + Error ('makefile %s not found' % (gArgs.Makefile)) + + # + # Build command line arguments converting build arguments to makefile de= fines + # + CommandLine =3D [Makefile] + CommandLine.append('TARGET_ARCH=3D"%s"' % (' '.join([Item[0] for Item in= gArgs.Arch]))) + CommandLine.append('TOOL_CHAIN_TAG=3D"%s"' % (gArgs.ToolChain)) + CommandLine.append('TARGET=3D"%s"' % (gArgs.BuildTarget)) + CommandLine.append('ACTIVE_PLATFORM=3D"%s"' % (gArgs.PlatformFile)) + CommandLine.append('CONF_DIRECTORY=3D"%s"' % (gArgs.ConfDirectory)) + if gArgs.Define: + for Item in gArgs.Define: + if '=3D' not in Item[0]: + continue + Item =3D Item[0].split('=3D',1) + CommandLine.append('%s=3D"%s"' % (Item[0], Item[1])) + CommandLine.append('EXTRA_FLAGS=3D"%s"' % (gArgs.Remaining)) + CommandLine.append(gArgs.BuildType) + if sys.platform =3D=3D "win32": + CommandLine =3D 'nmake /f %s' % (' '.join(CommandLine)) + else: + CommandLine =3D 'make -f %s' % (' '.join(CommandLine)) + + # + # Run the makefile + # + try: + Process =3D subprocess.Popen(CommandLine, shell=3DTrue) + except: + Error ('make command not available. Please verify PATH') + Process.communicate() + + # + # Done + # + Log ('Done') + + # + # Return status from running the makefile + # + sys.exit(Process.returncode) --=20 2.13.1.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Fri May 3 07:02:25 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1501781446243568.6825315605778; Thu, 3 Aug 2017 10:30:46 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 187F821CF950A; Thu, 3 Aug 2017 10:28:31 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 43AD121CE7490 for ; Thu, 3 Aug 2017 10:28:29 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 03 Aug 2017 10:30:41 -0700 Received: from mdkinney-mobl1.amr.corp.intel.com ([10.254.75.199]) by fmsmga006.fm.intel.com with ESMTP; 03 Aug 2017 10:30:40 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,317,1498546800"; d="scan'208";a="135756579" From: Michael D Kinney To: edk2-devel@lists.01.org Date: Thu, 3 Aug 2017 10:30:23 -0700 Message-Id: <20170803173023.2452-4-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.13.1.windows.2 In-Reply-To: <20170803173023.2452-1-michael.d.kinney@intel.com> References: <20170803173023.2452-1-michael.d.kinney@intel.com> Subject: [edk2] [RFC Patch 3/3] BaseTools/Scripts: Add sample makefile for use with RunMakefile.py X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Kinney , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add sample makefile that can be used to test RunMakefile.py script and can also be used as a template to start a new PREBUILD/POSTBUILD makefile. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney Reviewed-by: Yonghong Zhu =20 --- BaseTools/Scripts/RunMakefileSample.mak | 43 +++++++++++++++++++++++++++++= ++++ 1 file changed, 43 insertions(+) create mode 100644 BaseTools/Scripts/RunMakefileSample.mak diff --git a/BaseTools/Scripts/RunMakefileSample.mak b/BaseTools/Scripts/Ru= nMakefileSample.mak new file mode 100644 index 0000000000..b0947b7644 --- /dev/null +++ b/BaseTools/Scripts/RunMakefileSample.mak @@ -0,0 +1,43 @@ +## @file +# Sample makefile for PREBUILD or POSTBUILD action. +# +# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BS= D License +# which accompanies this distribution. The full text of the license may be= found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. +# + +all: show + @echo $@ +genc: show + @echo $@ +genmake: show + @echo $@ +modules: show + @echo $@ +libraries: show + @echo $@ +fds: show + @echo $@ +clean: show + @echo $@ +cleanall: show + @echo $@ +cleanlib: show + @echo $@ +run: show + @echo $@ + +show: + @echo WORKSPACE........ $(WORKSPACE) + @echo PACKAGES_PATH.... $(PACKAGES_PATH) + @echo ACTIVE_PLATFORM.. $(ACTIVE_PLATFORM) + @echo TARGET_ARCH...... $(TARGET_ARCH) + @echo TOOL_CHAIN_TAG... $(TOOL_CHAIN_TAG) + @echo CONF_DIRECTORY... $(CONF_DIRECTORY) + @echo TARGET........... $(TARGET) + @echo EXTRA_FLAGS...... $(EXTRA_FLAGS) --=20 2.13.1.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel