Subject: Re: should use MKUPDATE instead of UPDATE ?
To: Luke Mewburn <>
From: Darrin B.Jewell <>
List: tech-toolchain
Date: 09/13/2006 11:02:00
Luke Mewburn <> writes:
> I'm not sure how well the "${empty(PRESERVE):?" syntax works
> in make(1); maybe it's better than it used to be.

Well, the construct used in that makefile works, but I did
spend some time scratching my head over the :? syntax.
It turns out that the major problem I encountered is that
the `:' modifier parsing happens first, and then the conditional
is evaluated.  This implies that you cannot use a modifier
inside the parenthesis in the predicate like this:


Because it will first get separated into
     "empty(FOO" with :M matching the pattern "bar)"
with the :? operator trying to match on the result.

I also wasn't able to get just about any other
predicate in the :? operator to work, I tried unsuccessfully
various ways of using == != > < etc. like this:

 or this

But after some experimentation and watching make debug
output, I still couldn't find a useful way to use any
of these other operators.

I also just tried a plain variable in the predicate like this:

Since the man page indicates that conditional expressions
without a relational operator are compared against 0 or the empty
string, but it seems to always return the true consequent
no matter what values for $FOO I tried.

I'd like to see some clear use cases for :?

It would definitely be useful if it worked, but for the most part I
couldn't make it do what I wanted.  I ended up settling on the one
construct that I could get expected behavior out of.