ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angelo Schneider <>
Subject Newbie question: how to recurse into subdirectories?
Date Sat, 12 Oct 2002 19:47:21 GMT

I like to get down into my directory tree and create a subdirectory in
each directory.

E.g. start is src/ with subdirectories: src/core src/model

I like to have a task creating src/rcs, src/core/rcs and src/model/rcs.

Some things I do not understand with ant(and the documentation covers
that realy weak):

a) why does this task recurse into all directories?
  <target name="compile" depends="init"
        description="compile the source " >
    <!-- Compile the java code from ${src} into ${build} -->
    <javac srcdir="${src}" destdir="${build}"/>

b) why does the task above know to work on *.class versus *.java
files?(comparing timestamps and issuing a call to the compiler)
Nowhere in the build file is a dependency between *.class and *.java

c) this does of course not recure into directories:
   <target name="rcs">
        <mkdir dir="rcs"/>

Basicly it is clear that this should not be intended here ... however
comparing it with the javac task ... both seem to be syntacticaly
equivalent but the semantics is quite different(beyond directory
creation and compilation).

So: where to get a hint about the basic concepts how ant works? 

E.g. the ** semenatics in pathes is rather wiered. A "ant for makefile
authors" guide would be highly appreciated :-) (( yes, I have read the
ant documentation ))

But more important, how do I create rcs subdirectories for my source
tree with ant?

Best regards,

Angelo Schneider         OOAD/UML
Putlitzstr. 24       Patterns/FrameWorks          Fon: +49 721 9812465
76137 Karlsruhe           C++/JAVA                Fax: +49 721 9812467

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message