Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.bin/make

On Sat, Jan 24, 2009 at 04:24:39PM +0200, Alan Barrett wrote:
> For example, what is the correct way to do what I am trying
> to do below:
>     ${empty(${VAR:arbitary_modifiers_here}):?is empty:not empty}
>     ${${FOO} == ${BAR}:?same:different}
>     ${defined(FOO) && ${BAR} > ${BAZ}:?expression is true:false}
Those 3 probably work exactly as you might expect.

>     ${VAR:M42:?contains 42:does not contain 42}

That will apply the :M42 to the value of ${VAR}, but then check
.if VAR
ie .if defined(VAR)
and get 'true'

What could be simpler!


David Laight:

Home | Main Index | Thread Index | Old Index