06b9b3e0ad
Quite a lot of churn on style, but lots of good work refactoring complicated functions and lots more unit-tests. Thanks mostly to rillig at NetBSD Some interesting entries from ChangeLog o .MAKE.{UID,GID} represent uid and gid running make. o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable checks in InitObjdir. Explicit .OBJDIR target always allows read-only directory. o add more unit tests for META MODE Merge commit '8e11a9b4250be3c3379c45fa820bff78d99d5946' into main Change-Id: I464fd4c013067f0915671c1ccc96d2d8090b2b9c
50 lines
1.2 KiB
Makefile
50 lines
1.2 KiB
Makefile
# $NetBSD: directive-endif.mk,v 1.5 2020/12/14 21:56:17 rillig Exp $
|
|
#
|
|
# Tests for the .endif directive.
|
|
#
|
|
# 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.
|
|
#
|
|
# See also:
|
|
# Cond_EvalLine
|
|
|
|
# TODO: Implementation
|
|
|
|
.MAKEFLAGS: -dL
|
|
|
|
# Error: .endif does not take arguments
|
|
.if 0
|
|
# Since 2020-12-15, complain about the extra text after the 'endif'.
|
|
.endif 0
|
|
|
|
# Error: .endif does not take arguments
|
|
.if 1
|
|
# Since 2020-12-15, complain about the extra text after the 'endif'.
|
|
.endif 1
|
|
|
|
# Comments are allowed after an '.endif'.
|
|
.if 2
|
|
.endif # comment
|
|
|
|
# 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'
|
|
|
|
all:
|
|
@:;
|