File: ternary

package info (click to toggle)
bmake 20140620-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,784 kB
  • ctags: 3,362
  • sloc: ansic: 17,315; sh: 842; python: 419; exp: 379; makefile: 280; perl: 55
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}"