You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by hiren patel <hi...@yahoo.com> on 2005/08/03 01:27:12 UTC
urgent : CC task compiles every time even .C is not changed
Hi,
I am using CC task and it compiles prog.c to prog but it does it all the time regardless of
prog.c has changed or not.
ANT should not recompile when source .c has not changed. but it does..
do you know what is wrong?
here is the code of build.xml:
please provide suggestions ASAP
hiren patel
project name="CC Example" default="BuildProg">
<taskdef resource="cpptasks.tasks"/>
<typedef resource="cpptasks.types"/>
<!-- Compilation settings -->
<!-- Set compiler property depending from os -->
<condition property="compiler" value="gcc">
<os family="unix"/>
</condition>
<condition property="compiler" value="msvc">
<os family="windows"/>
</condition>
<target name="clean">
<delete file="prog" />
</target>
<target name="init">
</target>
<target name="BuildProg" depends="init"
description="example of source compilation">
<cc outfile="prog"
subsystem="other"
name="${compiler}"
exceptions="true"
objdir="."
debug="true"
outtype="executable">
<fileset file="prog.c" />
<defineset define="SOME_DEFINE_1" />
<defineset define="SOME_DEFINE_2" />
<includepath path="."/>
<!-- for example link with libstdc++ -->
</cc>
</target>
</project>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: urgent : CC task compiles every time even .C is not changed
Posted by Jeffrey E Care <ca...@us.ibm.com>.
This behavior has nothing to do with the Ant runtime and everything to do
with the implementation of the cc task.
I would suggest that you take this up with the antcontrib folks.
--
Jeffrey E. Care (carej@us.ibm.com)
WebSphere v7 Release Engineer
WebSphere Build Tooling Lead (Project Mantis)
hiren patel <hi...@yahoo.com> wrote on 08/02/2005 07:27:12 PM:
> Hi,
> I am using CC task and it compiles prog.c to prog but it does it
> all the time regardless of
> prog.c has changed or not.
>
> ANT should not recompile when source .c has not changed. but it does..
>
> do you know what is wrong?
>
> here is the code of build.xml:
>
> please provide suggestions ASAP
> hiren patel
>
>
> project name="CC Example" default="BuildProg">
> <taskdef resource="cpptasks.tasks"/>
> <typedef resource="cpptasks.types"/>
> <!-- Compilation settings -->
> <!-- Set compiler property depending from os -->
> <condition property="compiler" value="gcc">
> <os family="unix"/>
> </condition>
> <condition property="compiler" value="msvc">
> <os family="windows"/>
> </condition>
>
> <target name="clean">
> <delete file="prog" />
> </target>
>
> <target name="init">
> </target>
>
> <target name="BuildProg" depends="init"
> description="example of source compilation">
> <cc outfile="prog"
> subsystem="other"
> name="${compiler}"
> exceptions="true"
> objdir="."
> debug="true"
> outtype="executable">
>
> <fileset file="prog.c" />
>
> <defineset define="SOME_DEFINE_1" />
> <defineset define="SOME_DEFINE_2" />
>
> <includepath path="."/>
>
> <!-- for example link with libstdc++ -->
> </cc>
> </target>
> </project>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com