tech-toolchain archive

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

Re: make: conditionals inside muti-line commands



In article <20150713192636.GK576%trav.math.uni-bonn.de@localhost>,
Edgar Fuß  <ef%math.uni-bonn.de@localhost> wrote:
>EF> Is there another way to achieve what I want without opening the target 
>EF> multiple times?
>
>CZ> foobar:
>CZ> 	( \
>CZ> 	${foo:Dfalse:Utrue} || echo foo=${foo}; \
>CZ> 	${bar:Dfalse:Utrue} || echo bar=${bar}; \
>CZ> 	) > ${.TARGET}
>
>Ah, neat, thanks. But why :Dfalse:Utrue || and not :Dtrue:Ufalse && ?
>
>Just because I'm curious:
>EF> Is this a bug?
>

You could do it either way :-)

christos



Home | Main Index | Thread Index | Old Index