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