11.2Srillig# $NetBSD: directive-for-generating-endif.mk,v 1.2 2023/06/01 20:56:35 rillig Exp $ 21.1Srillig# 31.1Srillig# Test whether a .for loop can be used to generate multiple .endif 41.1Srillig# directives to close nested .if directives. Depending on the exact 51.1Srillig# implementation, this might have been possible. 61.1Srillig# 71.1Srillig# If it were possible, the 3 .if directives would perfectly match the 81.1Srillig# 3 .endif directives generated by the .for loop. 91.1Srillig# 101.1Srillig# After the "included file" from the .for loop, the 3 .if directives 111.1Srillig# are still open. 121.1Srillig# 131.1Srillig# See For_Run and ParseReadLine. Each .for loop is treated like a separately 141.1Srillig# included file, and in each included file the .if/.endif directives must be 151.1Srillig# balanced. 161.1Srillig 171.1Srillig.if 1 181.1Srillig. if 2 191.1Srillig. if 3 201.1Srillig.for i in 3 2 1 211.2Srillig# expect+3: if-less endif 221.2Srillig# expect+2: if-less endif 231.2Srillig# expect+1: if-less endif 241.1Srillig.endif 251.1Srillig.endfor 261.1Srillig 271.1Srilligall: 281.1Srillig @:; 291.2Srillig# expect+1: 3 open conditionals 30