freebsd-nq/contrib/bmake/unit-tests/directive-if-nested.mk
Simon J. Gerraty e2eeea75eb Merge bmake-20201117
o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
  checks in InitObjdir.  Explicit .OBJDIR target always allows
  read-only directory.

o More code cleanup and refactoring.

o More unit tests

MFC after:	1 week
2020-11-20 06:02:31 +00:00

26 lines
607 B
Makefile

# $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}