tags:

views:

49

answers:

1

A company I am working for, has some c binaries build with ant using cpptask. They use ivy to retrieve shared c libraries every time we start a build which wastes a significant amount of time comparing the revisions and downloading, when then only need to be download if the header files have changed. I have added a target which sets a var, which causes the build to skip over the ivy steps but I'd like a better solution. I see that cpptask creates a file history.xml and only rebuilds to binary if any of the sources have change. I'd like to know if there is way to independently test if the binary needs to build, and it does, I'd like it fire off the ivy targets. I'd also like for a variable to be set if the binary was rebuilt so that I can conditionally start an rpm generation task

A: 
<project name="conditional_compile" default="build">

    <condition property="file.modified">
        <isfileselected file="test.txt">
            <modified/>
        </isfileselected>
    </condition>

    <target name="build" if="file.modified">
        <echo message="This is a compile step that depends on the modification of a file"/>
    </target>

</project>
Mark O'Connor
I already knew it could be done that way, what I want is way to do it using the file dependence list (history.xml file) that cpptask::cc task generates. I don't think in this day an age we should have to manually list all file dependencies.
AC