harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Chernyshev" <a.y.chernys...@gmail.com>
Subject Re: Platform dependent code placement (was: Re: repo layout again)
Date Wed, 22 Feb 2006 21:41:19 GMT
On 2/23/06, Matt Benson <gudnabrsam@yahoo.com> wrote:
> Are these just sample names? Could there be
> shared/foo_linux.c
> whatever/bar_linux.c
> foo_ia32/bar.c
> bar_linux/baz.c
> baz_linux_ia32/more.c

Yes, they could. The pattern for identifying architecture or OS
dependence for a file is like [\W_]${attr}[\W_] where ${attr} stands
for either specific OS or architecture.

>
> If so, will a directory always have no more than one
> "leading name", i.e. not OS or architecture?

I'd suggest that file is considered platform dependent if it contains
any of "magic" platform keywords (like ia32, linux, e.t.c.) in it's
full name. Directory name may or may not contain a "leading name". For
example, file */linux/*.c should be considered as linux specific as
well. Another example, file */*_linux_solaris_*/*.c is considered as
shared between linux and solaris, but not applicable for win, e.t.c.

Thank you,
Andrey Chernyshev
Intel Middleware Products Division

>
> Thanks,
> Matt
>
> > Ideally, I'd wish to do that with a code something
> > like this:
> >
> >           <fileset dir="." includes="**/*.c">
> >                 <and>
> >                     <or>
> >                         <filenameregex
> > expression="[\W_]${env.OS}[\W_]"/>
> >                         <not>
> >                             <filenameregex
> > expression="[\W_](win|linux|solaris)[\W_]"/>
> >                         </not>
> >                     </or>
> >                     <or>
> >                         <filenameregex
> > expression="[\W_]${env.ARCH}[\W_]"/>
> >                         <not>
> >                             <filenameregex
> > expression="[\W_](ia32|sparc|ipf)[\W_]"/>
> >                         </not>
> >                     </or>
> >                 </and>
> >           </fileset>
> >     </cc>
> >
> > The above logic exactly describes the layout of a
> > platform dependent
> > code that I suggested for Harmony.
> >
> > I've tried to use standard <filename> and
> > <containsregex> selectors,
> > but they didn't appear suitable for that purpose.
> >
> > Thank you,
> > Andrey Chernyshev
> > Intel Middleware Products Division
> >
> > >
> > > -Matt
> > >
> > > --- Andrey Chernyshev <a.y.chernyshev@gmail.com>
> > > wrote:
> > > (a bunch of stuff I snipped ;)
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > > http://mail.yahoo.com
> > >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

Mime
View raw message