Home | History | Annotate | Line # | Download | only in unit-tests
directive-endif.mk revision 1.4
      1 # $NetBSD: directive-endif.mk,v 1.4 2020/12/14 20:57:31 rillig Exp $
      2 #
      3 # Tests for the .endif directive.
      4 #
      5 # See also:
      6 #	Cond_EvalLine
      7 
      8 # TODO: Implementation
      9 
     10 .MAKEFLAGS: -dL
     11 
     12 # Error: .endif does not take arguments
     13 # XXX: Missing error message
     14 .if 0
     15 .endif 0
     16 
     17 # Error: .endif does not take arguments
     18 # XXX: Missing error message
     19 .if 1
     20 .endif 1
     21 
     22 # Comments are allowed after an '.endif'.
     23 .if 2
     24 .endif # comment
     25 
     26 # Only whitespace and comments are allowed after an '.endif', but nothing
     27 # else.
     28 # XXX: Missing error message
     29 .if 1
     30 .endif0
     31 
     32 # Only whitespace and comments are allowed after an '.endif', but nothing
     33 # else.
     34 # XXX: Missing error message
     35 .if 1
     36 .endif/
     37 
     38 # After an '.endif', no other letter must occur.  This 'endifx' is not
     39 # parsed as an 'endif', therefore another '.endif' must follow to balance
     40 # the directives.
     41 .if 1
     42 .endifx
     43 .endif # to close the preceding '.if'
     44 
     45 all:
     46 	@:;
     47