1*956e45f6SSimon J. Gerraty# $NetBSD: shell-csh.mk,v 1.5 2020/10/19 19:14:11 rillig Exp $ 2*956e45f6SSimon J. Gerraty# 3*956e45f6SSimon J. Gerraty# Tests for using a C shell for running the commands. 4*956e45f6SSimon J. Gerraty 5*956e45f6SSimon J. GerratyCSH!= which csh || true 6*956e45f6SSimon J. Gerraty 7*956e45f6SSimon J. Gerraty# The shell path must be an absolute path. 8*956e45f6SSimon J. Gerraty# This is only obvious in parallel mode since in compat mode, 9*956e45f6SSimon J. Gerraty# simple commands are executed via execve directly. 10*956e45f6SSimon J. Gerraty.if ${CSH} != "" 11*956e45f6SSimon J. Gerraty.SHELL: name="csh" path="${CSH}" 12*956e45f6SSimon J. Gerraty.endif 13*956e45f6SSimon J. Gerraty 14*956e45f6SSimon J. Gerraty# In parallel mode, the commandShell->noPrint command is filtered from 15*956e45f6SSimon J. Gerraty# the output, rather naively (in JobOutput). 16*956e45f6SSimon J. Gerraty# 17*956e45f6SSimon J. Gerraty# Until 2020-10-03, the output in parallel mode was garbled because 18*956e45f6SSimon J. Gerraty# the definition of the csh had been wrong since 1993 at least. 19*956e45f6SSimon J. Gerraty.MAKEFLAGS: -j1 20*956e45f6SSimon J. Gerraty 21*956e45f6SSimon J. Gerratyall: 22*956e45f6SSimon J. Gerraty.if ${CSH} != "" 23*956e45f6SSimon J. Gerraty # This command is both printed and executed. 24*956e45f6SSimon J. Gerraty echo normal 25*956e45f6SSimon J. Gerraty 26*956e45f6SSimon J. Gerraty # This command is only executed. 27*956e45f6SSimon J. Gerraty @echo hidden 28*956e45f6SSimon J. Gerraty 29*956e45f6SSimon J. Gerraty # This command is both printed and executed. 30*956e45f6SSimon J. Gerraty +echo always 31*956e45f6SSimon J. Gerraty 32*956e45f6SSimon J. Gerraty # This command is both printed and executed. 33*956e45f6SSimon J. Gerraty -echo ignore errors 34*956e45f6SSimon J. Gerraty 35*956e45f6SSimon J. Gerraty # In the C shell, "unset verbose" is set as the noPrint command. 36*956e45f6SSimon J. Gerraty # Therefore it is filtered from the output, rather naively. 37*956e45f6SSimon J. Gerraty @echo 'They chatted in the sunset verbosely.' 38*956e45f6SSimon J. Gerraty.else 39*956e45f6SSimon J. Gerraty @sed '$$d' ${MAKEFILE:.mk=.exp} # This is cheated. 40*956e45f6SSimon J. Gerraty.endif 41