logo       

Re: Platform dependent code placement (was: Re: repo layout again): msg#00984

java.harmony.devel

Subject: Re: Platform dependent code placement (was: Re: repo layout again)

On 2/21/06, Matt Benson <gudnabrsam@xxxxxxxxx> wrote:
> I have tried to reconstruct the gist of this
> discussion from the archives (wasn't paying enough
> attention the first time through), without much luck.
> :) Since the discussion has evolved this far, I
> 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

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@xxxxxxxxx>
> 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
>



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise