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

Anuj Goyal anuj.goyal at gmail.com
Thu Nov 18 09:49:40 PST 2004


you are right the glob should be in the if where I decide to
RunErrorMsgCompiler or not.

is "Glob" have any other side effects besides checking for the
existence of files?


On Thu, 18 Nov 2004 01:15:05 -0800 (PST), Diane Holt <holtdl at yahoo.com> wrote:
> You don't want (or need) to if off the actions block - that's just a
> definition of what will happen should a RunErrorMsgCompiler target get
> built. You want to if off the target. You can use Glob to check for files.
> Just set a var based on the return from it, then check for whether the var
> has a value.
> 
> Diane
> 
> 
> 
> --- Anuj Goyal <anuj.goyal at gmail.com> wrote:
> 
> > I want to test for existence of a file before I "run" an action...
> >
> > something like this.... but I don't think my syntax is correct....
> > because it ALWAYS runs the command, even if it exists...
> >
> >
> >   if ! $(NQERROUT_H) {
> >   actions RunErrorMsgCompiler {
> > LD_LIBRARY_PATH=$(NQ_LIBDIR):$(ALL_LOCATE_TARGET) $(>[1]) $(>[2-])
> > $(<) }
> >   }



More information about the jamming mailing list