--- Andrey Chernyshev <[EMAIL PROTECTED]>
wrote:
> On 2/21/06, Matt Benson <[EMAIL PROTECTED]>
> wrote:
[SNIP]
> > wonder if anyone could restate the Ant-specific
> part
> > of the problem in concise terms, with the example
> > directory structure and desired selection... ? in
> > case I might tersify the expression at all, I'd
> like
> > to help Harmony in this small way as I've not yet
> > found time to do more...
>
> Hi Matt,
>
> Thanks for your attention to this.
> I'd like to have a selector in Ant FileSet, which
> would select file
> names based on a regular expression. The regexp
> needs to be matched
> with the string which consists of a path relative to
> the base dir of a
> fileset, plus file name.
>
> For example, suppose we have a set of files like
> this:
> shared\test_linux_ia32.c
> shared\test_shared.c
> shared\test_win.c
> shared\test_win_ia32.c
> test_ia32\test1.c
> test_linux\test2.c
> test_win_ia32\test4.c
>
> Then, for linux/ia32 configuration the selector
> should take:
>
> shared\test_linux_ia32.c
> shared\test_shared.c
> test_ia32\test1.c
> test_linux\test2.c
>
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
If so, will a directory always have no more than one
"leading name", i.e. not OS or architecture?
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