2023-06-01 23:56:35 +03:00
|
|
|
# $NetBSD: directive-endif.mk,v 1.7 2023/06/01 20:56:35 rillig Exp $
|
2020-08-16 15:07:50 +03:00
|
|
|
#
|
2020-08-16 17:25:16 +03:00
|
|
|
# Tests for the .endif directive.
|
2020-11-13 01:40:11 +03:00
|
|
|
#
|
2020-12-15 00:56:17 +03: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-13 01:40:11 +03:00
|
|
|
# See also:
|
|
|
|
# Cond_EvalLine
|
2020-08-16 15:07:50 +03:00
|
|
|
|
2020-11-13 01:40:11 +03:00
|
|
|
.MAKEFLAGS: -dL
|
|
|
|
|
|
|
|
.if 0
|
2023-06-01 10:27:30 +03:00
|
|
|
# Since 2020-12-15:
|
|
|
|
# expect+1: The .endif directive does not take arguments
|
2020-11-13 01:40:11 +03:00
|
|
|
.endif 0
|
|
|
|
|
|
|
|
.if 1
|
2023-06-01 10:27:30 +03:00
|
|
|
# Since 2020-12-15:
|
|
|
|
# expect+1: The .endif directive does not take arguments
|
2020-11-13 01:40:11 +03:00
|
|
|
.endif 1
|
|
|
|
|
|
|
|
# Comments are allowed after an '.endif'.
|
|
|
|
.if 2
|
|
|
|
.endif # comment
|
|
|
|
|
2020-12-14 23:57:31 +03:00
|
|
|
# Only whitespace and comments are allowed after an '.endif', but nothing
|
|
|
|
# else.
|
|
|
|
.if 1
|
2023-06-01 10:27:30 +03:00
|
|
|
# Since 2020-12-15:
|
|
|
|
# expect+1: The .endif directive does not take arguments
|
2020-12-14 23:57:31 +03:00
|
|
|
.endif0
|
|
|
|
|
|
|
|
# Only whitespace and comments are allowed after an '.endif', but nothing
|
|
|
|
# else.
|
|
|
|
.if 1
|
2023-06-01 10:27:30 +03:00
|
|
|
# Since 2020-12-15:
|
|
|
|
# expect+1: The .endif directive does not take arguments
|
2020-12-14 23:57:31 +03:00
|
|
|
.endif/
|
|
|
|
|
2023-06-01 10:27:30 +03:00
|
|
|
# After an '.endif', no other letter must occur.
|
2020-12-14 23:57:31 +03:00
|
|
|
.if 1
|
2023-06-01 10:27:30 +03:00
|
|
|
# expect+1: Unknown directive "endifx"
|
2020-12-14 23:57:31 +03:00
|
|
|
.endifx
|
2023-06-01 10:27:30 +03:00
|
|
|
.endif # to close the preceding '.if'
|