diff options
Diffstat (limited to 'contrib/bmake/unit-tests/directive-if-nested.mk')
-rw-r--r-- | contrib/bmake/unit-tests/directive-if-nested.mk | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/bmake/unit-tests/directive-if-nested.mk b/contrib/bmake/unit-tests/directive-if-nested.mk new file mode 100644 index 000000000000..19c8e9452660 --- /dev/null +++ b/contrib/bmake/unit-tests/directive-if-nested.mk @@ -0,0 +1,25 @@ +# $NetBSD: directive-if-nested.mk,v 1.1 2020/11/10 22:23:37 rillig Exp $ +# +# Tests for deeply nested .if directives. By default, memory for 128 nested +# .if directives is pre-allocated, any deeper nesting is reallocated. +# +# See also: +# Cond_EvalLine + +GEN= directive-if-nested.inc + +all: set-up test tear-down + +set-up: .PHONY + @{ printf '.if %s\n' ${:U:range=1000}; \ + printf '.info deeply nested .if directives\n'; \ + printf '.endif # %s\n' ${:U:range=1000}; \ + printf '\n'; \ + printf 'all:\n'; \ + } > ${GEN} + +test: .PHONY + @${MAKE} -f ${GEN} + +tear-down: .PHONY + @rm -f ${GEN} |