1 1.10 rillig # $NetBSD: shell-csh.mk,v 1.10 2025/06/05 21:56:54 rillig Exp $ 2 1.1 rillig # 3 1.1 rillig # Tests for using a C shell for running the commands. 4 1.1 rillig 5 1.7 sjg CSH!= which csh 2> /dev/null || true 6 1.5 rillig 7 1.4 rillig # The shell path must be an absolute path. 8 1.4 rillig # This is only obvious in parallel mode since in compat mode, 9 1.9 rillig # simple commands are executed via execvp directly. 10 1.5 rillig .if ${CSH} != "" 11 1.5 rillig .SHELL: name="csh" path="${CSH}" 12 1.5 rillig .endif 13 1.3 rillig 14 1.6 rillig # In parallel mode, the shell->noPrint command is filtered from 15 1.8 rillig # the output, rather naively (in PrintOutput). 16 1.3 rillig # 17 1.4 rillig # Until 2020-10-03, the output in parallel mode was garbled because 18 1.4 rillig # the definition of the csh had been wrong since 1993 at least. 19 1.3 rillig .MAKEFLAGS: -j1 20 1.1 rillig 21 1.1 rillig all: 22 1.5 rillig .if ${CSH} != "" 23 1.2 rillig # This command is both printed and executed. 24 1.2 rillig echo normal 25 1.2 rillig 26 1.2 rillig # This command is only executed. 27 1.2 rillig @echo hidden 28 1.2 rillig 29 1.2 rillig # This command is both printed and executed. 30 1.2 rillig +echo always 31 1.2 rillig 32 1.2 rillig # This command is both printed and executed. 33 1.2 rillig -echo ignore errors 34 1.4 rillig 35 1.4 rillig # In the C shell, "unset verbose" is set as the noPrint command. 36 1.10 rillig # Therefore, it is filtered from the output, rather naively. 37 1.10 rillig # FIXME: Don't assume a newline character in PrintFilteredOutput. 38 1.10 rillig # expect: They chatted in the sy. 39 1.4 rillig @echo 'They chatted in the sunset verbosely.' 40 1.5 rillig .else 41 1.5 rillig @sed '$$d' ${MAKEFILE:.mk=.exp} # This is cheated. 42 1.5 rillig .endif 43