[Omake] Odd trouble with file-exists

Jared C. Davis jared at cs.utexas.edu
Wed Apr 18 20:28:07 PDT 2007


Hi,

Thanks, I'll give that a try :)

Jared

On 4/18/07, Aleksey Nogin <nogin at metaprl.org> wrote:
> Jared,
>
> The results of stat operations (including the file-exists tests) are
> normally cached by OMake. Before the rule was executed, the stat was
> already taken (and OMake cached the fact that the file is not there).
> After the rule is executed, the cache is reset for the rule's target and
> OMake will know the file exists, however during the rule execution, the
> cache might be stale.
>
> If you need to have a test that bypasses the cache, use the
> "$(test -e $(patchfile)))"
>
> Aleksey
>
> On 18.04.2007 10:03, Jared C. Davis wrote:
>
> > Hi,
> >
> > Am I doing something wrong, or is this a bug?
> >
> > Notice that says file-exists is false, even though it gets created and
> > ls believes it exists:
> >
> > bash-3.1$ ls
> > OMakefile  OMakeroot
> >
> > bash-3.1$ cat OMakefile
> > .DEFAULT: worse-termp-patch.lisp
> >
> > worse-termp-patch.lisp:
> >    section
> >        patchfile = $(file worse-termp-patch.lisp)
> >        touch $(patchfile)
> >        ls -lah $(patchfile)
> >        println(File exists is $(file-exists $(patchfile)))
> >
> > bash-3.1$ cat OMakeroot
> > .SUBDIRS: .
> >
> > bash-3.1$ omake
> > *** omake: reading OMakefiles
> > *** omake: finished reading OMakefiles (0.0 sec)
> > - build . worse-termp-patch.lisp
> > + sequence
> >     patchfile = $(file ("worse-termp-patch.lisp"))
> >     shell(("touch ", $(patchfile)))
> >     shell(("ls -lah ", $(patchfile)))
> >     println(("File exists is ", $(file-exists $(patchfile))))
> >     cancel-export
> > -rw-r--r-- 1 jared grad 0 Apr 18 12:01 worse-termp-patch.lisp
> > File exists is false
> > *** omake: done (0.2 sec, 0/0 scans, 1/1 rules, 3/15 digests)
> >
> > bash-3.1$ omake --version
> > OMake 0.9.8 (release 2):
> >     build [Thu Jan 25 10:45:53 2007]
> >     on lego.cs.utexas.edu
> >
> > Default library directory : /lusr/opt/omake-0.9.8/lib/omake
> >
> > Thanks!
> >   Jared
> >
>
> _______________________________________________
> Omake mailing list
> Omake at metaprl.org
> https://lists.metaprl.org/mailman/listinfo/omake
>


-- 
Jared C. Davis <jared at cs.utexas.edu>
3600 Greystone Drive #604
Austin, TX 78731
http://www.cs.utexas.edu/users/jared/


More information about the Omake mailing list