tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Improvement for bmake: boolean values
>> .function yesno(s) ((s ==i "yes") || (s == "1") || \
>> ((s !=i "no") && (s != "0") && error("invalid yesno() argument"))
> ISTRUE=($1 ==i "yes") || ($1 == "1") || \
> (($1 !=i "no") && ($1 != "0") && ${.ERROR:> "Invalid truth value"})
> .if ${ISTRUE:> ${FOO}}
Doh! Yes, you are _so_ right. I obviously didn't have my head deep
enough into the make paradigm when I scribbled my idea out.
> I've floated this idea before a couple of times but it's always
> seemed like a jumbo-sized can of worms. On the plus side, it's not
> that big a jump to implement.
No? Do we already have binding contours? That's what this seems to me
to be demanding, and I don't think we have anything like them.
Though perhaps if it applies to just $1, $2, etc, which have no other
meaning...maybe the magic can be in those variables rather than in a
full-fledged binding mechanism.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index