You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Fajian Shi <fs...@saltare.com> on 2000/11/16 20:48:28 UTC

Is Ant able to simulate the full dependency relation as done in makefile?

Hi,
Thanks for the mailing lists that really solves my many questions. Here
comes a new one:

Suppose I want to generate a set of data files by running Java tasks several
times. Since Java only accepts one main class (am I right?), so I am forced
repeat java task multiple times in Ant. I want to know if it is possible to
do the job without repeating java tasks, by using dependence, as usually
done in makefile?

The following is how the makefile do it:
-------------------------------------------------------------------
%Hashtable.dat: com/dmi/rmi/negotiation/%.class
	object='echo $< | sed "s/.*.....| tr "/" ".";
      $(JAVA) $(JAVA_OPTIONS) -classpath $(CLASSPATH) $$object;

DataTables:=\
 	File1Hashtable.dat\
      File2Hashtable.dat\
       ...          \
      File10Hashtable.dat

Test: $(DataTables)
-------------------------------------------------------------------

I find it is hard for me to use the dependence of target in Ant to perform
the same job, any ideas?

++Fajian