1# $NetBSD: directive-for-generating-endif.mk,v 1.1 2020/08/29 18:50:25 rillig Exp $
2#
3# Test whether a .for loop can be used to generate multiple .endif
4# directives to close nested .if directives.  Depending on the exact
5# implementation, this might have been possible.
6#
7# If it were possible, the 3 .if directives would perfectly match the
8# 3 .endif directives generated by the .for loop.
9#
10# After the "included file" from the .for loop, the 3 .if directives
11# are still open.
12#
13# See For_Run and ParseReadLine.  Each .for loop is treated like a separately
14# included file, and in each included file the .if/.endif directives must be
15# balanced.
16
17.if 1
18.  if 2
19.    if 3
20.for i in 3 2 1
21.endif
22.endfor
23
24all:
25	@:;
26