ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Barclay <Daniel.Barc...@digitalfocus.com>
Subject Re: How to use UpToDate with absolute source file name (not patterns)
Date Wed, 09 May 2001 15:31:35 GMT
Diane Holt wrote:
> 
> --- Daniel Barclay <Daniel.Barclay@digitalfocus.com> wrote:
> > Can the "uptodate" task be used with an absolute file pathname for a
> > source file?
> >
> > (I think) I want to something like this:
> >
> >     <uptodate property="isUpToDate" targetfile=".flagfile" >
> >       <srcfiles dir=".">
> >         <include name="${sourceFile}" />
> >       </srcfiles>
> >     </uptodate>
> >
> > If property sourceFile is a relative name, the name works as a file
> > pattern, and everything works.
> >
> > However, if sourceFile is an absolute pathname (on Windows, so
> > starting with "C:/..."), the uptodate task doesn't work.  (It
> > always thinks the target file is up to date.)
> >
> > Can the uptodate task be used with absolute pathnames?
> 
> Try setting the "dir" attribute of <srcfiles> to the full-path leading up
> to the file, then specify the filename for the <include> (or "includes").

But that solution would require splitting my sourceFile property into two 
parts just to refer to my file.  That's gross (having to change that much
just to refer to the file).

Is there any other way to pass a filename to the uptodate task?

If not, then there's a design bug (a feature limitation) here.  (There 
should be a way to specify a file by absolute name.)


Daniel
-- 
Daniel Barclay
Digital Focus
Daniel.Barclay@digitalfocus.com

Mime
View raw message