--- Andrey Chernyshev <[EMAIL PROTECTED]> wrote: > On 2/23/06, Matt Benson <[EMAIL PROTECTED]> > 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.
Ah... I hadn't extrapolated the linux_solaris possibility. The reason I asked my last question--i.e. will there always be foo_os, foo_arch, foo_os_arch as opposed to foo_bar_os, foo_bar_arch, foo_bar_os_arch--is to learn more about how to differentiate between foo_ia32 and foo_win_ia32. The reason being that the combination of linux/ia32 can't just blindly include any file/dir with ia32 in the name or it could pick up e.g. foo_win_ia32... can you confirm there would be no reason for foo_bar_(os_arch|os|arch)? -Matt > > 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 > <[EMAIL PROTECTED]> > > > > 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 > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com