tech-userlevel archive

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

Re: make: new modifyer :Y



On Mon, Nov 07, 2011 at 11:56:27AM +0300, Aleksey Cheusov wrote:
> As I said bad@ "fixed" the problem in revision 1.24 Now the code looks
> like
> 
>      30 .if defined(PKG_DEVELOPER) && ${PKG_DEVELOPER} != "no"
>      31 CHECK_INTERPRETER?=             yes
>      32 .else
> 
> There are two problems here:
> 1) too much code for so simple action! 54(!!!) characters for checking.
>    Multiply 54 on a number of times PKG_DEVELOPER variable occurs in pkgsrc 
> code.
> 2) check for PKG_DEVELOPER value is *case-sensitive*. Serious bug? No,
>    just a side effect of the lack of functionality in our make.
> 
> Won't the following be better and easier?
> 
>      30 .if ${PKG_DEVELOPER:Y}
>      31 CHECK_INTERPRETER?=             yes
>      32 .else

There are many different ways to express it better than the above. I
don't think adding a new modifier, especially an obscure one, is really
that helpful. Heck, even :true would be more obvious...

Joerg


Home | Main Index | Thread Index | Old Index