File: ternary

package info (click to toggle)
pmake 1.111-3.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,052 kB
  • sloc: ansic: 14,169; exp: 230; makefile: 132; sh: 59
file content (8 lines) | stat: -rw-r--r-- 206 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8

all:
	@for x in "" A= A=42; do ${.MAKE} -f ${MAKEFILE} show $$x; done

show:
	@echo "The answer is ${A:?known:unknown}"
	@echo "The answer is ${A:?$A:unknown}"
	@echo "The answer is ${empty(A):?empty:$A}"