[jamming] testing for existence of a file...

Craig Allsop callsop at sceptre.net
Mon Nov 29 14:55:16 PST 2004



I believe you need one of these:


SubDir TOP the current dir ;


And change this line to..


local _file = [ Glob $(SUBDIR) : $(NQERROR) ] ;


Be sure TOP is set otherwise it will not work.




-----Original Message-----
From: jamming-admin at perforce.com [mailto:jamming-admin at perforce.com] On
Behalf Of Anuj Goyal
Sent: Friday, 19 November 2004 4:39 AM
To: jamming at perforce.com
Subject: Re: [jamming] testing for existence of a file...


$ cat Jamfile



NQERROR = wrope.cpp ;

local _file = [ Glob $(NQERROR) ] ;


if $(_file) {

  Echo [FOUND] I found the file ;

} else {

  Echo [NOTFOUND] I did not find the file ;




$ jam

[NOTFOUND] I did not find the file

...found 7 target(s)...


### and obviously wrope.cpp exists!!! 


$ ls wrope.cpp

-rw-r--r--  1 angoyal users 193 2004-09-16 21:50 wrope.cpp


jamming mailing list  -  jamming at perforce.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.perforce.com/pipermail/jamming/attachments/20041130/86186811/attachment-0001.html>

More information about the jamming mailing list