ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry V. Streepy, Jr." <>
Subject Re: Building many to one
Date Fri, 08 Jun 2001 15:21:09 GMT
I don't know the specifics of how the windows lib command works, but if
you want ALL the *.obj files to be included in the command, you probably
DON'T want to use the apply task since it would only include source
files that are newer than the mapped target files.

You may want to consider using the uptodate task and then use a
conditional task to do the jar.  Like this:

  <target name="maybe-lib">
    <uptodate property="lib.notNeeded" targetfile="bnumber.lib" >
      <srcfiles dir="${dest}" includes="*.obj"/>

  <target name="build-lib" depends="maybe-lib" unless="lib.notNeeded">
    <exec ... the command to build your lib/>

Then "ant build-lib" should do what you want. wrote:
> Hi, all.
> How can i specify dependency on one file from many another.
> For  example,  i need to make lib from *.obj files. And i want that if
> one of *.obj files is changed then ant will rebuild it.
> I was try to do it by this part of build.xml file:
> <target name="link" depends="compile">
>   <apply dir="${dest}" executable="${vc.lib.prg}"  dest="${dest}" os="Windows 2000"
>     <arg line="${vc.lib.opt} /OUT:bnumber.lib"/>
>     <srcfile/>
>     <fileset dir="${dest}" includes="*.obj"/>
>     <mapper type="merge" to="bnumber.lib"/>
>   </apply>
> </target>
> If *.obj files have older time than bnumber.lib then ant generate the command:
> $> lib /OUT:bnumber.lib
> withot specifying any source.
> Why it happend?

Larry V. Streepy, Jr.
Chief Technical Officer and VP of Engineering

Health Language, Inc.  -- "We speak the language of healthcare"

970/626-5028 (office) 
970/626-4425 (fax)    

View raw message