You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Shawn Castrianni <Sh...@halliburton.com> on 2008/04/20 07:57:19 UTC

apply task

I just discovered the apply task as a better exec task.  I like that it automatically loops through the fileset one at a time and automatically does a timestamp check if you give it a dest and mapper.  However, I have one small problem.  On windows, the C compiler specifies the output file name with a /Fofoo.obj such that the output filename is directly after /Fo with no space in between.  The apply task provides me with a <targetfile/> tag which is the place holder for the target file name, but it treats this as a separate argument to the executable.  Therefore, it puts a space in between /Fo and <targetfile/>.  This break the C compiler on windows.  How can I specify that <targetfile/> should be part of the previous <arg value="/Fo"/>.  Is there some property that is set for each file as apply loops through the fileset so that I can use the property name instead of the <targetfile/> tag?

---
Shawn Castrianni

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.

Re: apply task

Posted by Dominique Devienne <dd...@gmail.com>.
On Sun, Apr 20, 2008 at 12:57 AM, Shawn Castrianni
<Sh...@halliburton.com> wrote:
> I just discovered the apply task as a better exec task.  I like that it automatically loops through the fileset one at a time and automatically does a timestamp check if you give it a dest and mapper.  However, I have one small problem.  On windows, the C compiler specifies the output file name with a /Fofoo.obj such that the output filename is directly after /Fo with no space in between.  The apply task provides me with a <targetfile/> tag which is the place holder for the target file name, but it treats this as a separate argument to the executable.  Therefore, it puts a space in between /Fo and <targetfile/>.  This break the C compiler on windows.  How can I specify that <targetfile/> should be part of the previous <arg value="/Fo"/>.  Is there some property that is set for each file as apply loops through the fileset so that I can use the property name instead of the <targetfile/> tag?

Hmmm, you may not like this answer Shawn, but don't use <apply> for C
compiles, use CppTasks instead. You even have plenty of builds already
using it as examples ;-)

--DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org