Greetings,

I posted this to ant-user, but thought that there might be a 'developer' solution to this.

It appears that Ant only builds one target at a time. So when building multiple targets, Ant builds each target successively. The result being that any common targets are executed multiple times.

I've found a hack around this:

    <target name="init" unless="init.complete">
        <echo message="init executing..."/>
        <tstamp/>
        <property name="init.complete" value="true"/>
    </target>

But I don't like it.

So, is there some other way of either (a) keeping targets/tasks from running more than once or (b) building the entire tree of targets to be built in one pass?

On a more general note, I'm really surprised that Ant seems to have no concept of an up-to-date target, or up-to-date source files. Make really only does one thing: determine which set of files are out of date and executes commands to bring them up-to-date.

Ant, on the other hand, bills itself as a replacement for make but seems to leave this dependency checking entirely in the hands of the individual tasks. Am I missing something here, or does this seem like an obvious use pattern that should be somehow integrated with Ant (even if it's only a set of utility classes for use by tasks)?

Thanks,

__________________________________
James Bucanek
<mailto:[EMAIL PROTECTED]>



Reply via email to