ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Jacobs <forkj...@yahoo.com>
Subject Using apply to Link an Executable
Date Mon, 25 Nov 2002 18:39:19 GMT
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:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message