1116969Sdas# $NetBSD: sh-errctl.mk,v 1.1 2020/12/12 15:06:11 rillig Exp $ 2142843Sdas# 3116969Sdas# Test a shell with error control. This only works in jobs mode; in compat 4116969Sdas# mode, the default shell is always used, see InitShellNameAndPath. 5116969Sdas# 6116969Sdas# There is a subtle difference between error control and echo control. 7116969Sdas# With error control, each simple command is checked, whereas with echo 8116969Sdas# control, only the last command from each line is checked. A shell command 9116969Sdas# line that behaves differently in these two modes is "false; true". In 10116969Sdas# error control mode, this fails, while in echo control mode, it succeeds. 11116969Sdas 12116969Sdas.MAKEFLAGS: -j1 -dj 13116969Sdas 14116969Sdas.SHELL: \ 15116969Sdas name="sh" \ 16116969Sdas path="${.SHELL}" \ 17116969Sdas hasErrCtl="yes" \ 18116969Sdas check="\# error checking on\nset -e" \ 19116969Sdas ignore="\# error checking off\nset +e" \ 20116969Sdas echo="\# echo on" \ 21116969Sdas quiet="\# echo off" 22116969Sdas 23116969Sdasall: 24116969Sdas @echo silent 25116969Sdas -echo ignerr; false 26116969Sdas +echo always 27116969Sdas