public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: "kyletpugh@gmail.com" <kyletpugh@gmail.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: Laszlo Ersek <lersek@redhat.com>,
	"Zhu, Yonghong" <yonghong.zhu@intel.com>
Subject: Re: [PATCH v1 1/1] BaseTools: AutoGen: Expand macros in INF files
Date: Wed, 25 Jan 2017 03:21:14 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6D47EA@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20170124191557.5404-2-apianti@users.sourceforge.net>

Hi, 
  This usage will break UDP (UEFI Platform Initialization Distribution Packaging Specification).  It can be downloaded from http://www.uefi.org/specifications. This spec defines the packaging format. It defines SourceFiles.Filename as the path (relative to the Module "root" directory) and filename of the file (as specified in the Distribution Content File.) That means source files must be in the module directory. 
  And, EDK2 BaseTools UPT tool follows UDP to create Package.dist based on edk2 source Package, and install Package.dist to edk2 source package. If source package has no change, UPT should always create the same package.dist file. But, this feature will break it. So, I don't suggest to add this support. 

Thanks
Liming
>-----Original Message-----
>From: kyletpugh@gmail.com [mailto:kyletpugh@gmail.com]
>Sent: Wednesday, January 25, 2017 3:16 AM
>To: edk2-devel@lists.01.org
>Cc: Laszlo Ersek <lersek@redhat.com>; Zhu, Yonghong
><yonghong.zhu@intel.com>; Gao, Liming <liming.gao@intel.com>
>Subject: [PATCH v1 1/1] BaseTools: AutoGen: Expand macros in INF files
>
>From: apianti <apianti@users.sourceforge.net>
>
>Expand environment macros used for paths and names in INF files
>
>Cc: Laszlo Ersek <lersek@redhat.com>
>Cc: Yonghong Zhu <yonghong.zhu@intel.com>
>Cc: Liming Gao <liming.gao@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.0
>Signed-off-by: apianti <apianti@users.sourceforge.net>
>---
> BaseTools/Source/Python/AutoGen/GenC.py    | 4 ++--
> BaseTools/Source/Python/AutoGen/GenMake.py | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/BaseTools/Source/Python/AutoGen/GenC.py
>b/BaseTools/Source/Python/AutoGen/GenC.py
>index 63cfe0422bbc..866e906f2f89 100644
>--- a/BaseTools/Source/Python/AutoGen/GenC.py
>+++ b/BaseTools/Source/Python/AutoGen/GenC.py
>@@ -21,7 +21,7 @@ from Common import EdkLogger
> from Common.BuildToolError import *
> from Common.DataType import *
> from Common.Misc import *
>-from Common.String import StringToArray
>+from Common.String import StringToArray, ReplaceMacro
> from StrGather import *
> from GenPcdDb import CreatePcdDatabaseCode
> from IdfClassObject import *
>@@ -1911,7 +1911,7 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH):
>         # Publish the CallerId Guid
>         #
>         AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED GUID
>gEfiCallerIdGuid = %s;\n' % GuidStringToGuidStructureString(Info.Guid))
>-        AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED CHAR8
>*gEfiCallerBaseName = "%s";\n' % Info.Name)
>+        AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED CHAR8
>*gEfiCallerBaseName = "%s";\n' % ReplaceMacro(Info.Name, os.environ))
>
> ## Create common code for header file
> #
>diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py
>b/BaseTools/Source/Python/AutoGen/GenMake.py
>index 51c5238fd17e..7ec59fca5271 100644
>--- a/BaseTools/Source/Python/AutoGen/GenMake.py
>+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
>@@ -587,7 +587,7 @@ cleanlib:
>             FileMacroList.append("%s = %s" % (ListFileMacro, ListFileName))
>             SaveFileOnChange(
>                 ListFileName,
>-                "\n".join(self.ListFileMacros[ListFileMacro]),
>+                "\n".join(ReplaceMacros(self.ListFileMacros[ListFileMacro],
>os.environ)),
>                 False
>                 )
>
>--
>2.11.0.windows.1



       reply	other threads:[~2017-01-25  3:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170124191557.5404-1-apianti@users.sourceforge.net>
     [not found] ` <20170124191557.5404-2-apianti@users.sourceforge.net>
2017-01-25  3:21   ` Gao, Liming [this message]
     [not found]     ` <CANUo9gvj=97X=Gh97Y4bk-MtcNsZ5f1fm_hp+Nyj+HqtqNUOGw@mail.gmail.com>
2017-02-03  5:31       ` [PATCH v1 1/1] BaseTools: AutoGen: Expand macros in INF files Gao, Liming
     [not found]         ` <CANUo9gsqxg9iSrT5QT6VCXL25_0=RAqOnaU9g+CQ_fc_eVTqUw@mail.gmail.com>
2017-02-04  6:03           ` Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14D6D47EA@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox