diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2021-01-14 06:21:37 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2021-01-14 06:21:37 +0000 |
commit | 06b9b3e0ad0dc3f0166b3e8f26ced68c271cf527 (patch) | |
tree | 92a02f1874a5dacc12b39edd184602d24888baad /contrib/bmake/unit-tests/compat-error.mk | |
parent | 0495ed398c4f64013bab2327eb13a303e1f90c13 (diff) | |
parent | 8e11a9b4250be3c3379c45fa820bff78d99d5946 (diff) | |
download | src-06b9b3e0ad0dc3f0166b3e8f26ced68c271cf527.tar.gz src-06b9b3e0ad0dc3f0166b3e8f26ced68c271cf527.zip |
Merge bmake-20210110
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
Diffstat (limited to 'contrib/bmake/unit-tests/compat-error.mk')
-rw-r--r-- | contrib/bmake/unit-tests/compat-error.mk | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/contrib/bmake/unit-tests/compat-error.mk b/contrib/bmake/unit-tests/compat-error.mk new file mode 100644 index 000000000000..4cbc48d4b6bb --- /dev/null +++ b/contrib/bmake/unit-tests/compat-error.mk @@ -0,0 +1,37 @@ +# $NetBSD: compat-error.mk,v 1.3 2020/12/13 19:33:53 rillig Exp $ +# +# Test detailed error handling in compat mode. +# +# Until 2020-12-13, .ERROR_TARGET was success3, which was wrong. +# Since compat.c 1.215 from 2020-12-13, it is 'fail1', which is the first +# failed top-level target. XXX: Even better would be if .ERROR_TARGET were +# the smallest target that caused the build to fail, even if it were a +# sub-sub-sub-dependency of a top-level target. +# +# XXX: As of 2020-12-13, .ERROR_CMD is empty, which is wrong. +# +# See also: +# Compat_Run +# +# The commit that added the NULL command to gn->commands: +# CVS: 1994.06.06.22.45.?? +# Git: 26a8972fd7f982502c5fbfdabd34578b99d77ca5 +# 1994: Lst_Replace (cmdNode, (ClientData) NULL); +# 2020: LstNode_SetNull(cmdNode); +# +# The commit that skipped NULL commands for .ERROR_CMD: +# CVS: 2016.08.11.19.53.?? +# Git: 58b23478b7353d46457089e726b07a49197388e4 + +.MAKEFLAGS: success1 fail1 success2 fail2 success3 + +success1 success2 success3: + : Making ${.TARGET} out of nothing. + +fail1 fail2: + : Making ${.TARGET} out of nothing. + false '${.TARGET}' '$${.TARGET}' '$$$${.TARGET}' + +.ERROR: + @echo ${.TARGET} target: '<'${.ERROR_TARGET:Q}'>' + @echo ${.TARGET} command: '<'${.ERROR_CMD:Q}'>' |