[Omake] test is always true???

Christopher L Conway cconway at cs.nyu.edu
Mon May 28 09:36:15 PDT 2007


In the following OMakefile, test returns true in every case. Am I
missing something about the arguments to test?

Thanks,
Chris

OMakefile:
X=$(getenv X)

if test -n $(X)
    println( 1. $(X) is non-null )

if test ! -n $(X)
    println( 2. $(X) is null )

if test -z $(X)
    println( 3. $(X) is null )

if test ! -z $(X)
    println( 4. $(X) is non-null )

if test -e $(X)
    println( 5. $(X) exists )

if test ! -e $(X)
    println( 6. $(X) does not exist )
---

$ X="" omake
*** omake: reading OMakefiles
1.  is non-null
2.  is null
3.  is null
4.  is non-null
5.  exists
6.  does not exist
*** omake: finished reading OMakefiles (0.0 sec)
*** omake: done (0.0 sec, 0/0 scans, 0/0 rules, 0/33 digests)
$ X=/bin/sh omake
*** omake: reading OMakefiles
1. /bin/sh is non-null
2. /bin/sh is null
3. /bin/sh is null
4. /bin/sh is non-null
5. /bin/sh exists
6. /bin/sh does not exist
*** omake: finished reading OMakefiles (0.0 sec)
*** omake: done (0.0 sec, 0/0 scans, 0/0 rules, 0/33 digests)


More information about the Omake mailing list