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.
36 lines
1.1 KiB
Makefile
36 lines
1.1 KiB
Makefile
# $NetBSD: sh-jobs.mk,v 1.4 2021/04/16 16:49:27 rillig Exp $
|
|
#
|
|
# Tests for the "run in jobs mode" part of the "Shell Commands" section
|
|
# from the manual page.
|
|
|
|
# TODO: Tutorial
|
|
|
|
.MAKEFLAGS: -j1
|
|
|
|
all: .PHONY comment .WAIT comment-with-followup-line .WAIT no-comment
|
|
|
|
# If a shell command starts with a comment character after stripping the
|
|
# leading '@', it is run in ignore-errors mode since the default runChkTmpl
|
|
# would lead to a syntax error in the generated shell file, at least for
|
|
# bash and dash, but not for NetBSD sh and ksh.
|
|
#
|
|
# See JobWriteCommand, cmdTemplate, runIgnTmpl
|
|
comment: .PHONY
|
|
@# comment
|
|
|
|
# If a shell command starts with a comment character after stripping the
|
|
# leading '@', it is run in ignore-errors mode.
|
|
#
|
|
# See JobWriteCommand, cmdTemplate, runIgnTmpl
|
|
comment-with-followup-line: .PHONY
|
|
@# comment${.newline}echo '$@: This is printed.'; false
|
|
@true
|
|
|
|
# Without the comment, the commands are run in the default mode, which checks
|
|
# the exit status of every makefile line.
|
|
#
|
|
# See JobWriteCommand, cmdTemplate, runChkTmpl
|
|
no-comment: .PHONY
|
|
@echo '$@: This is printed.'; false
|
|
@true
|