FWIW, I tried your solution Bruce that uses the <filename> selector, and it
didn't find the one duplicate file I was having. Reverting to using
<present> as the first selection of the <and> does work. I'm not sure why it
doesn't work with <filename>.
Selectors are a great piece of code. Thanks for them, Bruce. --DD
<fileset id="sources"
dir="${ds.home}/src">
<!-- This fileset selects all files included in more
than one module. It should be empty!!! -->
<or>
...
<and>
<present targetdir="../gocad/src" />
<or>
<present targetdir="../ow-sw/src" />
<present targetdir="../viz-fv/src" />
<present targetdir="../examples/src" />
</or>
</and>
<and>
<present targetdir="../ow-sw/src" />
<or>
<present targetdir="../viz-fv/src" />
<present targetdir="../examples/src" />
</or>
</and>
<and>
<present targetdir="../viz-fv/src" />
<or>
<present targetdir="../examples/src" />
</or>
</and>
</or>
</fileset>
-----Original Message-----
From: Bruce Atherton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 4:25 PM
To: Ant Users List
Subject: Re: Help with selectors
>I have no clue how to achieve (4). Help would be greatly appreciated. --DD
Tricky. Off the top of my head, if the combinatorial explosion isn't too
large, you could do something like:
<fileset dir=".">
<or>
<and>
<filename name="A/src/**" />
<or>
<present present="both" targetdir="B/src" />
<present present="both" targetdir="C/src" />
</or>
</and>
<and>
<filename name="B/src/**" />
<or>
<present present="both" targetdir="A/src" />
<present present="both" targetdir="C/src" />
</or>
</and>
<and>
<filename name="C/src/**" />
<or>
<present present="both" targetdir="A/src" />
<present present="both" targetdir="B/src" />
</or>
</and>
</or>
</fileset>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>