You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Hendrik Maryns <qw...@sneakemail.com> on 2008/07/25 16:12:01 UTC
[newbie] Why doesn’t my fileset get deleted?
Hi,
I am struggling to set up my JNI project with Ant.
I already have makefiles for the C part and for now, I resort to using
<target name="c-build" description="Build the C files">
<mkdir dir="${bindir}/Mona"/>
<exec executable="make" dir="makefiles" />
</target>
but I’d be happy if people could point me to other ways to to this.
make invokes gcc, sets some platform-dependent compiler options and
invokes swig. Not easy to do in Ant, as far as I can tell.
But now to my real question: my clean target does not do as expected. I
have the following:
<property name="srcdir" value="src" />
<property name="bindir" value="bin" />
<target name="clean">
<delete dir="${bindir}" />
<delete>
<fileset dir="${srcdir}/de/uni_tuebingen/sfb/lichtenstein/binarytrees">
<patternset id="swig.java.files">
<include name="Mona.java,MonaJNI.java,mg*.java" />
</patternset>
</fileset>
</delete>
</target>
The bin directory gets deleted as expected, but those java files are
not. Why?
Buildfile: /home/hendrik/workspace/MonaSearch/build.xml
clean:
[delete] Deleting directory /home/hendrik/workspace/MonaSearch/bin
BUILD SUCCESSFUL
Total time: 383 milliseconds
TIA, H.
--
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
Re: [newbie] Why doesn’t my fileset get deleted?
Posted by Dominique Devienne <dd...@gmail.com>.
On Fri, Jul 25, 2008 at 9:12 AM, Hendrik Maryns
<qw...@sneakemail.com> wrote:
> but I'd be happy if people could point me to other ways to to this.
Not easy to setup the first time indeed. I used lots of custom tasks
when I did that in a previous life, but it'd be too long to explain it
all, sorry.
> <include name="Mona.java,MonaJNI.java,mg*.java" />
Would work if it was in the 'includes' attribute of <fileset>, but
<include name> takes a *single* pattern. You thus need:
<include name="Mona.java" />
<include name="MonaJNI.java" />
<include name="mg*.java" />
Cheers, --DD
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org