But, perhaps on a better note, check out ant-contrib at Sourceforge. There is some very nicely done Ant pieces for doing native compilation and linking that may just make what you're doing a bit easier and more flexible in the long run.
Erik
Frank Jacobs wrote:
I'm having some trouble automating the linking of .o files into an executable. I would like Ant to link together my executable only if the executable is not up-to-date. I'm trying to do it with apply and a mapper. However, I think my understanding of mappers is a bit off.I've tried two methods. The first will correctly link the application together, but (as expected) does not take the up-to-date status of files into account. In other words, the command will run everytime even if no files have been touched. <target name="nativec"> <apply executable="gcj" parallel="true"> <arg line="--main=${executable}"/> <arg line="-o ${executable}"/> <fileset dir="." includes="**/*.o"/> </apply> </target> The next example does not work, but will take into account the up-to-date status of files: <target name="nativec"> <apply executable="gcj" dest="." parallel="true"> <arg line="--main=${executable}"/> <arg line="-o ${executable}"/> <fileset dir="." includes="**/*.o"/> <mapper type="merge" to="Main.exe"/> </apply> </target> Basically, I want to tell Ant: "If any .o files have changed, relink and include all .o files (changed or unchanged); otherwise do nothing." Does anyone have any ideas? Thanks, Frank __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus – Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>