diff options
Diffstat (limited to 'contrib/bmake/unit-tests/sh-leading-hyphen.mk')
-rw-r--r-- | contrib/bmake/unit-tests/sh-leading-hyphen.mk | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/contrib/bmake/unit-tests/sh-leading-hyphen.mk b/contrib/bmake/unit-tests/sh-leading-hyphen.mk index d760abb9afdd..08b50a2ddc42 100644 --- a/contrib/bmake/unit-tests/sh-leading-hyphen.mk +++ b/contrib/bmake/unit-tests/sh-leading-hyphen.mk @@ -1,4 +1,4 @@ -# $NetBSD: sh-leading-hyphen.mk,v 1.3 2020/11/15 20:20:58 rillig Exp $ +# $NetBSD: sh-leading-hyphen.mk,v 1.4 2023/01/19 19:55:27 rillig Exp $ # # Tests for shell commands preceded by a '-', to ignore the exit status of # the command line. @@ -11,4 +11,19 @@ # TODO: Implementation all: - @:; + -true + -false + + # An undefined variable expands to an empty string, without warning. + # This is used in practice for prefixing tool names or for DESTDIR. + # The '-' before 'unknown' is interpreted by make as '.IGNORE' flag. + ${UNDEF}-unknown-command 'needed for needshell in compat.c' + + # Expanding undefined variables may lead to strange error messages + # when the shell interprets single-character options as commands + # instead. + ${UNDEF} --unknown-long-option 'needed for needshell in compat.c' + + # Since 2023-01-17, the leading '@', '+' and '-' may contain + # whitespace, for compatibility with GNU make. + - - - @echo 'whitespace in leading part' |