trans-coord-devel
[Top][All Lists]
Advanced

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

Re: trans-coord/gnun/prep/gnun ChangeLog GNUmakefile


From: Yavor Doganov
Subject: Re: trans-coord/gnun/prep/gnun ChangeLog GNUmakefile
Date: Wed, 6 Feb 2008 18:38:49 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14) (GNU/Linux i586)

On Wed, Feb 06, 2008 at 06:28:52PM +0200, Kaloian Doganov wrote:
>     -ifeq (yes,$(VALIDATE))
>     +ifneq (,$(findstring yes,$(VALIDATE)))
> 
> Why do you think that this is a more robust way to check for a value?

Because it provides a more flexible way to use multiple values.  Suppose 
a fictional variable where we have "yes", "always", but also different 
modes to do something, like "hard", "soft" and "medium".  So by using 
the findstring function plus extra conditional(s), you could do

make FROBNICATE=yes,hard

Currently we don't take advantage of this, but it's better to be 
prepared.  It can't do harm, only good.

This is also the recommended way to catch variables defined on the 
command line -- which is natural because it's pretty hard to do useful 
things without findstring for cases like CFLAGS="-Wall -g -O2" (just an 
example).

> (Other than that the validation will be triggered by "eyes" and
> "yesterday" values.)

That's a feature.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]