1# $NetBSD: sh-meta-chars.mk,v 1.4 2020/12/07 22:27:56 rillig Exp $
2#
3# Tests for running shell commands that contain meta-characters.
4#
5# These meta-characters decide whether the command is run by the shell
6# or executed directly via execv, but only in compatibility mode, not
7# in jobs mode, and only if MAKE_NATIVE is defined during compilation.
8#
9# See also:
10#	Compat_RunCommand, useShell
11
12all:
13
14# The command "exit 0" contains no special characters, therefore it is
15# run directly via execv, but only if MAKE_NATIVE is defined.
16USING_EXEC!=	{ echo 'all:; exit 0' | ${MAKE} -r -f - 1>/dev/null 2>&1; } \
17		&& echo yes || echo no
18
19# It's hard to do any useful tests that result in the same output.
20# See SED_CMDS.sh-dots, which normalizes the test output for the specific
21# case of the special command '...'.
22.if ${USING_EXEC} != "yes" && ${USING_EXEC} != "no"
23.  error
24.endif
25