2021-01-14 01:24:34 +00:00
|
|
|
# $NetBSD: directive-endif.mk,v 1.5 2020/12/14 21:56:17 rillig Exp $
|
2020-09-05 16:11:04 +00:00
|
|
|
#
|
|
|
|
# Tests for the .endif directive.
|
2020-11-20 03:54:37 +00:00
|
|
|
#
|
2021-01-14 01:24:34 +00:00
|
|
|
# Since 2020-12-15, the .endif directive no longer accepts arguments.
|
|
|
|
# The manual page had never allowed that, but the code didn't check it.
|
|
|
|
#
|
2020-11-20 03:54:37 +00:00
|
|
|
# See also:
|
|
|
|
# Cond_EvalLine
|
2020-09-05 16:11:04 +00:00
|
|
|
|
|
|
|
# TODO: Implementation
|
|
|
|
|
2020-11-20 03:54:37 +00:00
|
|
|
.MAKEFLAGS: -dL
|
|
|
|
|
|
|
|
# Error: .endif does not take arguments
|
|
|
|
.if 0
|
2021-01-14 01:24:34 +00:00
|
|
|
# Since 2020-12-15, complain about the extra text after the 'endif'.
|
2020-11-20 03:54:37 +00:00
|
|
|
.endif 0
|
|
|
|
|
|
|
|
# Error: .endif does not take arguments
|
|
|
|
.if 1
|
2021-01-14 01:24:34 +00:00
|
|
|
# Since 2020-12-15, complain about the extra text after the 'endif'.
|
2020-11-20 03:54:37 +00:00
|
|
|
.endif 1
|
|
|
|
|
|
|
|
# Comments are allowed after an '.endif'.
|
|
|
|
.if 2
|
|
|
|
.endif # comment
|
|
|
|
|
2021-01-14 01:24:34 +00:00
|
|
|
# Only whitespace and comments are allowed after an '.endif', but nothing
|
|
|
|
# else.
|
|
|
|
.if 1
|
|
|
|
# Since 2020-12-15, complain about the extra text after the 'endif'.
|
|
|
|
.endif0
|
|
|
|
|
|
|
|
# Only whitespace and comments are allowed after an '.endif', but nothing
|
|
|
|
# else.
|
|
|
|
.if 1
|
|
|
|
# Since 2020-12-15, complain about the extra text after the 'endif'.
|
|
|
|
.endif/
|
|
|
|
|
|
|
|
# After an '.endif', no other letter must occur. This 'endifx' is not
|
|
|
|
# parsed as an 'endif', therefore another '.endif' must follow to balance
|
|
|
|
# the directives.
|
|
|
|
.if 1
|
|
|
|
.endifx
|
|
|
|
.endif # to close the preceding '.if'
|
|
|
|
|
2020-09-05 16:11:04 +00:00
|
|
|
all:
|
|
|
|
@:;
|