mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
![Simon J. Gerraty](/assets/img/avatar_default.png)
Lots more unit tests and code cleanup Relevant changes from ChangeLog o job.c: Print -de error information when running multiple jobs o var.c: only report error for unmatched regex subexpression when linting (-dL) since we cannot tell when an unmatched subexpression is an expected result. reduce memory allocations in the modifiers ':D' and ':U' reduce memory allocation and strlen calls in modifier ':from=to' in the ':Q' modifier, only allocate memory if necessary improve performance for LazyBuf reduce debug logging and memory allocation for ${:U...} reduce verbosity of the -dv debug logging for standard cases fix double varname expansion in the variable modifier '::=' o var.c: avoid evaluating many modifiers in parse only mode in strict mode (-dL) many variable references are parsed twice, the first time just to report parse errors early, so we want to avoid side effects and wasted effort to the extent possible.
41 lines
1.1 KiB
Makefile
41 lines
1.1 KiB
Makefile
# $NetBSD: shell-csh.mk,v 1.8 2021/04/04 09:58:51 rillig Exp $
|
|
#
|
|
# Tests for using a C shell for running the commands.
|
|
|
|
CSH!= which csh 2> /dev/null || true
|
|
|
|
# The shell path must be an absolute path.
|
|
# This is only obvious in parallel mode since in compat mode,
|
|
# simple commands are executed via execve directly.
|
|
.if ${CSH} != ""
|
|
.SHELL: name="csh" path="${CSH}"
|
|
.endif
|
|
|
|
# In parallel mode, the shell->noPrint command is filtered from
|
|
# the output, rather naively (in PrintOutput).
|
|
#
|
|
# Until 2020-10-03, the output in parallel mode was garbled because
|
|
# the definition of the csh had been wrong since 1993 at least.
|
|
.MAKEFLAGS: -j1
|
|
|
|
all:
|
|
.if ${CSH} != ""
|
|
# This command is both printed and executed.
|
|
echo normal
|
|
|
|
# This command is only executed.
|
|
@echo hidden
|
|
|
|
# This command is both printed and executed.
|
|
+echo always
|
|
|
|
# This command is both printed and executed.
|
|
-echo ignore errors
|
|
|
|
# In the C shell, "unset verbose" is set as the noPrint command.
|
|
# Therefore it is filtered from the output, rather naively.
|
|
@echo 'They chatted in the sunset verbosely.'
|
|
.else
|
|
@sed '$$d' ${MAKEFILE:.mk=.exp} # This is cheated.
|
|
.endif
|