Subject: Re: make: needs a tweak
To: James Chacon <jmc@NetBSD.org>
From: Simon J. Gerraty <sjg@crufty.net>
List: tech-toolchain
Date: 04/07/2004 16:25:25
>> > 
>> >    ${NUMBERS:@n@${("${PRIMES:M$n}" == ""):?$n:}@}
>> > 
>> >    to work.
>> 
>> This seems like a good idea.

>Except for looking extremely ugly :-)

Most expressions using :@ get pretty ugly - combined with :? ...
I have some make foo that will turn your stomach ;-)

>> > 4. Make:
>> > 
>> >    ${PRIMES:M$n:?:$n}
>> > 
>> >    work as expected?  Ie. if ${PRIMES:M$n} is empty, then :? should
>> >    eval false.
>> 
>> This also seems reasonable.

>I like this one the best myself. Where is $n coming from in this case, a 
>.for expansion?

I was getting sick of putting the whole ${NUMBERS:@n@ bit in.
But yes $n is comming from a :@ loop or a .for loop - it doesn't make
much difference.

Thanks
--sjg

>James