directive-for-generating-endif.mk revision 1.1
11.1Srillig# $NetBSD: directive-for-generating-endif.mk,v 1.1 2020/08/29 18:50:25 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.1Srillig.endif 221.1Srillig.endfor 231.1Srillig 241.1Srilligall: 251.1Srillig @:; 26