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
21 lines
801 B
Makefile
21 lines
801 B
Makefile
# $NetBSD: cond-eof.mk,v 1.2 2020/12/14 20:28:09 rillig Exp $
|
|
#
|
|
# Tests for parsing conditions, especially the end of such conditions, which
|
|
# are represented as the token TOK_EOF.
|
|
|
|
SIDE_EFFECT= ${:!echo 'side effect' 1>&2!}
|
|
SIDE_EFFECT2= ${:!echo 'side effect 2' 1>&2!}
|
|
|
|
# In the following conditions, ${SIDE_EFFECT} is the position of the first
|
|
# parse error. It is always fully evaluated, even if it were not necessary
|
|
# to expand the variable expression. This is because these syntax errors are
|
|
# an edge case that does not occur during normal operation, therefore there
|
|
# is no need to optimize for this case, and it would slow down the common
|
|
# case as well.
|
|
.if 0 ${SIDE_EFFECT} ${SIDE_EFFECT2}
|
|
.endif
|
|
.if 1 ${SIDE_EFFECT} ${SIDE_EFFECT2}
|
|
.endif
|
|
.if (0) ${SIDE_EFFECT} ${SIDE_EFFECT2}
|
|
.endif
|