public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Fan, ZhijuX" <zhijux.fan@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>
Cc: "afish@apple.com" <afish@apple.com>,
	"Gao, Liming" <liming.gao@intel.com>,
	"Feng, Bob C" <bob.c.feng@intel.com>,
	"Fan, ZhijuX" <zhijux.fan@intel.com>
Subject: Re: FW: [edk2-devel] [PATCH V2] BaseTools:improve code to support C files with .C suffixes
Date: Wed, 8 May 2019 01:57:00 +0000	[thread overview]
Message-ID: <FAD0D7E0AE0FA54D987F6E72435CAFD50AF5C221@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20190507144002.gq3rdtappd3rupmd@bivouac.eciton.net>

Hi Leif,

In AutoGen\GenMake.py.   It's around line 917
if File.Ext not in [".c", ".C"] or File.Name == "AutoGen.c"
there is similar code to check the .C file.
The 'File' above refers to the source File.Some source files are named.C


Any question, please let me know. Thanks.

Best Regards
Fan Zhiju



> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Leif Lindholm
> Sent: Tuesday, May 7, 2019 10:40 PM
> To: devel@edk2.groups.io; Fan, ZhijuX <zhijux.fan@intel.com>
> Cc: afish@apple.com; Gao, Liming <liming.gao@intel.com>; Feng, Bob C
> <bob.c.feng@intel.com>
> Subject: Re: FW: [edk2-devel] [PATCH V2] BaseTools:improve code to
> support C files with .C suffixes
> 
> Hi Fan Zhiju,
> 
> But where does the string come from that contains a .C suffix?
> Is the tool internally converting things to uppercase, or is some source file in
> the build incorrectly named?
> 
> I am asking because it is not clear to me whether the patch resolves a
> problem or hides one.
> 
> Best Regards,
> 
> Leif
> 
> On Tue, May 07, 2019 at 03:05:02AM +0000, Fan, ZhijuX wrote:
> > This problem has nothing to do with the file system, We just use the
> > filename as a string to compare with other strings Our unittest tested
> > minplatform, Ovmf. This problem was found when building a platform
> > inside Intel.
> > We've tested it on Linux and Windows.
> >
> > Any question, please let me know. Thanks.
> >
> > Best Regards
> > Fan Zhiju
> >
> > -----Original Message-----
> > From: afish@apple.com [mailto:afish@apple.com]
> > Sent: Tuesday, May 7, 2019 10:31 AM
> > To: devel@edk2.groups.io; Fan, ZhijuX <zhijux.fan@intel.com>
> > Cc: Gao, Liming <liming.gao@intel.com>; Feng, Bob C
> > <bob.c.feng@intel.com>
> > Subject: Re: [edk2-devel] [PATCH V2] BaseTools:improve code to support
> > C files with .C suffixes
> >
> > This brings up a question? Do we tests on a file system that is case sensitive?
> Is this just lack of a test case?
> >
> > Thanks,
> >
> > Andrew Fish
> >
> > > On May 6, 2019, at 7:22 PM, Fan, ZhijuX <zhijux.fan@intel.com> wrote:
> > >
> > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1773
> > >
> > > Build break if C file suffixes of named .C instead of .c Code not
> > > recognize filenames with .C suffixes.
> > >
> > > This patch adds code to Support both .c file and .C file
> > >
> > > Cc: Bob Feng <bob.c.feng@intel.com>
> > > Cc: Liming Gao <liming.gao@intel.com>
> > > Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
> > > ---
> > > BaseTools/Source/Python/AutoGen/GenMake.py | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py
> > > b/BaseTools/Source/Python/AutoGen/GenMake.py
> > > index 0e0f9fd9b0..858ddedf8e 100644
> > > --- a/BaseTools/Source/Python/AutoGen/GenMake.py
> > > +++ b/BaseTools/Source/Python/AutoGen/GenMake.py
> > > @@ -1035,7 +1035,8 @@ cleanlib:
> > >                         CmdTargetDict[CmdSign] = "%s %s" %
> (CmdTargetDict[CmdSign], SingleCommandList[-1])
> > >                     Index = CommandList.index(Item)
> > >                     CommandList.pop(Index)
> > > -                    if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLASH,
> CmdSumDict[CmdSign.lstrip('/Fo').rsplit(TAB_SLASH, 1)[0]])):
> > > +                    if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLASH,
> CmdSumDict[T.Target.SubDir])) or \
> > > +                            SingleCommandList[-1].endswith("%s%s.C" %
> (TAB_SLASH, CmdSumDict[T.Target.SubDir])):
> > >                         Cpplist = CmdCppDict[T.Target.SubDir]
> > >                         Cpplist.insert(0, '$(OBJLIST_%d): $(COMMON_DEPS)' %
> list(self.ObjTargetDict.keys()).index(T.Target.SubDir))
> > >                         T.Commands[Index] = '%s\n\t%s' % ('
> > > \\\n\t'.join(Cpplist), CmdTargetDict[CmdSign])
> > > --
> > > 2.14.1.windows.1
> > >
> > >
> > >
> > >
> > > <winmail.dat>
> >
> >
> >
> >
> 
> 


  reply	other threads:[~2019-05-08  1:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07  2:22 [PATCH V2] BaseTools:improve code to support C files with .C suffixes Fan, ZhijuX
2019-05-07  2:31 ` [edk2-devel] " Andrew Fish
2019-05-07  3:05   ` FW: " Fan, ZhijuX
2019-05-07 14:40     ` Leif Lindholm
2019-05-08  1:57       ` Fan, ZhijuX [this message]
2019-05-08  2:01       ` Andrew Fish
2019-05-08  9:09         ` Leif Lindholm
2019-05-08 10:57           ` Fan, ZhijuX
2019-05-08 12:08             ` Leif Lindholm
2019-05-08 13:59               ` Andrew Fish
2019-05-08 14:26                 ` Leif Lindholm
2019-05-08 19:50               ` Laszlo Ersek
2019-05-09  4:02                 ` Bob Feng

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=FAD0D7E0AE0FA54D987F6E72435CAFD50AF5C221@SHSMSX101.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