Module Name: src Committed By: rillig Date: Wed Feb 9 21:09:25 UTC 2022
Modified Files: src/usr.bin/make: cond.c hash.c make.1 parse.c src/usr.bin/make/unit-tests: Makefile directive-elifdef.mk directive-ifmake.mk meta-cmd-cmp.mk objdir-writable.mk opt-debug-parse.mk suff-use.mk var-op-sunsh.mk var-scope-local.mk varmod-assign.mk varmod-order-numeric.mk varmod-to-separator.mk varname.mk Log Message: make: fix mistakes, spelling and typos in comments and manual page No binary change for -DNDEBUG. To generate a diff of this commit: cvs rdiff -u -r1.328 -r1.329 src/usr.bin/make/cond.c cvs rdiff -u -r1.71 -r1.72 src/usr.bin/make/hash.c cvs rdiff -u -r1.304 -r1.305 src/usr.bin/make/make.1 cvs rdiff -u -r1.664 -r1.665 src/usr.bin/make/parse.c cvs rdiff -u -r1.305 -r1.306 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/directive-elifdef.mk cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/directive-ifmake.mk \ src/usr.bin/make/unit-tests/var-op-sunsh.mk \ src/usr.bin/make/unit-tests/varname.mk cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/meta-cmd-cmp.mk \ src/usr.bin/make/unit-tests/var-scope-local.mk cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/objdir-writable.mk cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/opt-debug-parse.mk \ src/usr.bin/make/unit-tests/varmod-order-numeric.mk cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/suff-use.mk cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/varmod-assign.mk cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/varmod-to-separator.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/cond.c diff -u src/usr.bin/make/cond.c:1.328 src/usr.bin/make/cond.c:1.329 --- src/usr.bin/make/cond.c:1.328 Wed Feb 9 21:03:13 2022 +++ src/usr.bin/make/cond.c Wed Feb 9 21:09:24 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.328 2022/02/09 21:03:13 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.329 2022/02/09 21:09:24 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -95,7 +95,7 @@ #include "dir.h" /* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: cond.c,v 1.328 2022/02/09 21:03:13 rillig Exp $"); +MAKE_RCSID("$NetBSD: cond.c,v 1.329 2022/02/09 21:09:24 rillig Exp $"); /* * Conditional expressions conform to this grammar: @@ -286,7 +286,7 @@ ParseFuncArg(CondParser *par, const char return res; } -/* Test whether the given variable is defined. */ +/* See if the given variable is defined. */ static bool FuncDefined(const char *var) { Index: src/usr.bin/make/hash.c diff -u src/usr.bin/make/hash.c:1.71 src/usr.bin/make/hash.c:1.72 --- src/usr.bin/make/hash.c:1.71 Thu Jan 27 11:00:07 2022 +++ src/usr.bin/make/hash.c Wed Feb 9 21:09:24 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: hash.c,v 1.71 2022/01/27 11:00:07 rillig Exp $ */ +/* $NetBSD: hash.c,v 1.72 2022/02/09 21:09:24 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -74,7 +74,7 @@ #include "make.h" /* "@(#)hash.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: hash.c,v 1.71 2022/01/27 11:00:07 rillig Exp $"); +MAKE_RCSID("$NetBSD: hash.c,v 1.72 2022/02/09 21:09:24 rillig Exp $"); /* * The ratio of # entries to # buckets at which we rebuild the table to @@ -283,7 +283,7 @@ HashTable_Set(HashTable *t, const char * HashEntry_Set(he, value); } -/* Delete the entry from the table and free the associated memory. */ +/* Delete the entry from the table, don't free the value of the entry. */ void HashTable_DeleteEntry(HashTable *t, HashEntry *he) { Index: src/usr.bin/make/make.1 diff -u src/usr.bin/make/make.1:1.304 src/usr.bin/make/make.1:1.305 --- src/usr.bin/make/make.1:1.304 Sat Jan 29 20:54:58 2022 +++ src/usr.bin/make/make.1 Wed Feb 9 21:09:24 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.304 2022/01/29 20:54:58 sjg Exp $ +.\" $NetBSD: make.1,v 1.305 2022/02/09 21:09:24 rillig Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -692,15 +692,15 @@ Variables that are defined specific to a .El .Pp Local variables can be set on a dependency line, if -.Va .MAKE.TARGET_LOCAL_VARIABLES , +.Va .MAKE.TARGET_LOCAL_VARIABLES is not set to .Ql false . The rest of the line -(which will already have had Global variables expanded), +(which will already have had global variables expanded) is the variable value. For example: .Bd -literal -offset indent -COMPILER_WRAPPERS+= ccache distcc icecc +COMPILER_WRAPPERS= ccache distcc icecc ${OBJS}: .MAKE.META.CMP_FILTER=${COMPILER_WRAPPERS:S,^,N,} .Ed @@ -708,17 +708,17 @@ ${OBJS}: .MAKE.META.CMP_FILTER=${COMPILE Only the targets .Ql ${OBJS} will be impacted by that filter (in "meta" mode) and -simply enabling/disabling any of the wrappers will not render all +simply enabling/disabling any of the compiler wrappers will not render all of those targets out-of-date. .Pp .Em NOTE : -target local variable assignments behave differently in that; +target-local variable assignments behave differently in that; .Bl -tag -width Ds -offset indent .It Ic \&+= Only appends to a previous local assignment for the same target and variable. .It Ic \&:= -Is redundant with respect to Global variables, +Is redundant with respect to global variables, which have already been expanded. .El .Pp Index: src/usr.bin/make/parse.c diff -u src/usr.bin/make/parse.c:1.664 src/usr.bin/make/parse.c:1.665 --- src/usr.bin/make/parse.c:1.664 Wed Feb 9 21:03:13 2022 +++ src/usr.bin/make/parse.c Wed Feb 9 21:09:24 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.664 2022/02/09 21:03:13 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.665 2022/02/09 21:09:24 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -106,7 +106,7 @@ #include "pathnames.h" /* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: parse.c,v 1.664 2022/02/09 21:03:13 rillig Exp $"); +MAKE_RCSID("$NetBSD: parse.c,v 1.665 2022/02/09 21:09:24 rillig Exp $"); /* * A file being read. @@ -753,14 +753,15 @@ ApplyDependencySourceMain(const char *sr Global_Append(".TARGETS", src); } +/* + * For the sources of a .ORDER target, create predecessor/successor links + * between the previous source and the current one. + */ static void ApplyDependencySourceOrder(const char *src) { GNode *gn; - /* - * Create proper predecessor/successor links between the previous - * source and the current one. - */ + gn = Targ_GetNode(src); if (doing_depend) RememberLocation(gn); @@ -1078,9 +1079,7 @@ CheckSpecialMundaneMixture(ParseSpecial * shouldn't be empty. */ case SP_NOT: - /* - * Nothing special here -- targets can be empty if it wants. - */ + /* Nothing special here -- targets may be empty. */ break; default: Parse_Error(PARSE_WARNING, @@ -1541,7 +1540,7 @@ Parse_IsVar(const char *p, VarAssign *ou cpp_skip_hspace(&p); /* Skip to variable name */ /* - * During parsing, the '+' of the '+=' operator is initially parsed + * During parsing, the '+' of the operator '+=' is initially parsed * as part of the variable name. It is later corrected, as is the * ':sh' modifier. Of these two (nameEnd and eq), the earlier one * determines the actual end of the variable name. Index: src/usr.bin/make/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.305 src/usr.bin/make/unit-tests/Makefile:1.306 --- src/usr.bin/make/unit-tests/Makefile:1.305 Wed Feb 9 20:52:06 2022 +++ src/usr.bin/make/unit-tests/Makefile Wed Feb 9 21:09:24 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.305 2022/02/09 20:52:06 rillig Exp $ +# $NetBSD: Makefile,v 1.306 2022/02/09 21:09:24 rillig Exp $ # # Unit tests for make(1) # @@ -665,7 +665,7 @@ LIMIT_RESOURCES?= ulimit -v 200000 .endif LIMIT_RESOURCES?= : -# Each test is run in a sub-make, to keep the tests for interfering with +# Each test is run in a sub-make, to keep the tests from interfering with # each other, and because they use different environment variables and # command line options. .SUFFIXES: .mk .rawout .out Index: src/usr.bin/make/unit-tests/directive-elifdef.mk diff -u src/usr.bin/make/unit-tests/directive-elifdef.mk:1.3 src/usr.bin/make/unit-tests/directive-elifdef.mk:1.4 --- src/usr.bin/make/unit-tests/directive-elifdef.mk:1.3 Sat Jan 22 16:23:56 2022 +++ src/usr.bin/make/unit-tests/directive-elifdef.mk Wed Feb 9 21:09:24 2022 @@ -1,7 +1,7 @@ -# $NetBSD: directive-elifdef.mk,v 1.3 2022/01/22 16:23:56 rillig Exp $ +# $NetBSD: directive-elifdef.mk,v 1.4 2022/02/09 21:09:24 rillig Exp $ # # Tests for the .elifdef directive, which is seldom used. Instead of writing -# '.elifdef VAR', the usual form is the more versatile '.elif defined(VAR)'. +# '.elifdef VAR', the usual form is the more general '.elif defined(VAR)'. # At this point, VAR is not defined, so the condition evaluates to false. .if 0 Index: src/usr.bin/make/unit-tests/directive-ifmake.mk diff -u src/usr.bin/make/unit-tests/directive-ifmake.mk:1.9 src/usr.bin/make/unit-tests/directive-ifmake.mk:1.10 --- src/usr.bin/make/unit-tests/directive-ifmake.mk:1.9 Sat Jan 22 16:23:56 2022 +++ src/usr.bin/make/unit-tests/directive-ifmake.mk Wed Feb 9 21:09:24 2022 @@ -1,10 +1,10 @@ -# $NetBSD: directive-ifmake.mk,v 1.9 2022/01/22 16:23:56 rillig Exp $ +# $NetBSD: directive-ifmake.mk,v 1.10 2022/02/09 21:09:24 rillig Exp $ # # Tests for the .ifmake directive, which provides a shortcut for asking # whether a certain target is requested to be made from the command line. # # TODO: Describe why the shortcut may be useful (if it's useful at all), -# instead of using the more versatile '.if make(target)'. +# instead of using the more general '.if make(target)'. .MAKEFLAGS: first second Index: src/usr.bin/make/unit-tests/var-op-sunsh.mk diff -u src/usr.bin/make/unit-tests/var-op-sunsh.mk:1.9 src/usr.bin/make/unit-tests/var-op-sunsh.mk:1.10 --- src/usr.bin/make/unit-tests/var-op-sunsh.mk:1.9 Sun Jan 16 09:38:04 2022 +++ src/usr.bin/make/unit-tests/var-op-sunsh.mk Wed Feb 9 21:09:24 2022 @@ -1,8 +1,8 @@ -# $NetBSD: var-op-sunsh.mk,v 1.9 2022/01/16 09:38:04 rillig Exp $ +# $NetBSD: var-op-sunsh.mk,v 1.10 2022/02/09 21:09:24 rillig Exp $ # # Tests for the :sh= variable assignment operator, which runs its right-hand # side through the shell. It is a seldom-used alternative to the != -# assignment operator, adopted from SUN make. +# assignment operator, adopted from Sun make. .MAKEFLAGS: -dL # Enable sane error messages Index: src/usr.bin/make/unit-tests/varname.mk diff -u src/usr.bin/make/unit-tests/varname.mk:1.9 src/usr.bin/make/unit-tests/varname.mk:1.10 --- src/usr.bin/make/unit-tests/varname.mk:1.9 Thu Jan 27 10:42:02 2022 +++ src/usr.bin/make/unit-tests/varname.mk Wed Feb 9 21:09:24 2022 @@ -1,4 +1,4 @@ -# $NetBSD: varname.mk,v 1.9 2022/01/27 10:42:02 rillig Exp $ +# $NetBSD: varname.mk,v 1.10 2022/02/09 21:09:24 rillig Exp $ # # Tests for special variables, such as .MAKE or .PARSEDIR. # And for variable names in general. @@ -42,7 +42,7 @@ ${VARNAME}= try3 .MAKEFLAGS: -d0 # All variable names of a scope are stored in the same hash table, using a -# simple hash function. Ensure that HashEntry_KeyEquals handles collisions +# simple hash function. Ensure that HashTable_Find handles collisions # correctly and that the correct variable is looked up. The strings "0x" and # "1Y" have the same hash code, as 31 * '0' + 'x' == 31 * '1' + 'Y'. V.0x= 0x Index: src/usr.bin/make/unit-tests/meta-cmd-cmp.mk diff -u src/usr.bin/make/unit-tests/meta-cmd-cmp.mk:1.4 src/usr.bin/make/unit-tests/meta-cmd-cmp.mk:1.5 --- src/usr.bin/make/unit-tests/meta-cmd-cmp.mk:1.4 Thu Jan 27 06:02:59 2022 +++ src/usr.bin/make/unit-tests/meta-cmd-cmp.mk Wed Feb 9 21:09:24 2022 @@ -1,4 +1,4 @@ -# $NetBSD: meta-cmd-cmp.mk,v 1.4 2022/01/27 06:02:59 sjg Exp $ +# $NetBSD: meta-cmd-cmp.mk,v 1.5 2022/02/09 21:09:24 rillig Exp $ # # Tests META_MODE command line comparison # @@ -36,7 +36,7 @@ ${tf}.cmp2: @echo FLAGS2=${FLAGS2:Uempty} > $@ @echo This line not compared FLAGS=${FLAGS:Uempty} ${.OODATE:MNOMETA_CMP} -COMPILER_WRAPPERS+= ccache distcc icecc +COMPILER_WRAPPERS= ccache distcc icecc WRAPPER?= ccache .ifdef WITH_CMP_FILTER .MAKE.META.CMP_FILTER+= ${COMPILER_WRAPPERS:S,^,N,} @@ -49,7 +49,7 @@ ${tf}.filter: .MAKE.META.CMP_FILTER= ${C ${tf}.filter: @echo ${WRAPPER} cc -c foo.c > $@ -# these do the same +# these do the same one two: .PHONY @echo $@: @${.MAKE} -dM -r -C ${.CURDIR} -f ${MAKEFILE} ${tests} Index: src/usr.bin/make/unit-tests/var-scope-local.mk diff -u src/usr.bin/make/unit-tests/var-scope-local.mk:1.4 src/usr.bin/make/unit-tests/var-scope-local.mk:1.5 --- src/usr.bin/make/unit-tests/var-scope-local.mk:1.4 Sat Feb 5 10:41:15 2022 +++ src/usr.bin/make/unit-tests/var-scope-local.mk Wed Feb 9 21:09:24 2022 @@ -1,4 +1,4 @@ -# $NetBSD: var-scope-local.mk,v 1.4 2022/02/05 10:41:15 rillig Exp $ +# $NetBSD: var-scope-local.mk,v 1.5 2022/02/09 21:09:24 rillig Exp $ # # Tests for target-local variables, such as ${.TARGET} or $@. These variables # are relatively short-lived as they are created just before making the @@ -18,7 +18,7 @@ # these expressions to expand right in time when the target-local variables # are actually set. # -# Conditions like the ones below are evaluated in the scope of the command +# Conditions from .if directives are evaluated in the scope of the command # line, which means that variables from the command line, from the global # scope and from the environment are resolved, in this order (but see the # command line option '-e'). In that phase, expressions involving @@ -33,15 +33,16 @@ # expressions like ${@}, ${.TARGET} ${VAR:Mpattern} (see Var_Parse, # ParseVarname). # -# In the following condition, make does not expand '$@' but instead changes it -# to the long-format alias '$(.TARGET)'; note that the alias is not written -# with braces, as would be common in BSD makefiles, but with parentheses. -# This alternative form behaves equivalently though. +# In the following condition, make expands '$@' to the long-format alias +# '$(.TARGET)'; note that the alias is not written with braces, as would be +# common in BSD makefiles, but with parentheses. This alternative spelling +# behaves the same though. .if $@ != "\$\(.TARGET)" . error .endif -# In the long form of writing a target-local variable, the expression is -# preserved exactly as written, no matter whether with '{' or '('. +# In the long form of writing a target-local variable, the text of the +# expression is preserved exactly as written, no matter whether it is written +# with '{' or '('. .if ${@} != "\$\{@}" . error .endif @@ -60,7 +61,7 @@ # In the following examples, the expressions are based on target-local # variables but use the modifier ':L', which turns an undefined expression # into a defined one. At the end of evaluating the expression, the state of -# the expression is not 'undefined' anymore, and the value of the expression +# the expression is not 'undefined' anymore. The value of the expression # is the name of the variable, since that's what the modifier ':L' does. .if ${@:L} != "@" . error @@ -164,10 +165,11 @@ var-scope-local-append.o: VAR+= local var-scope-local-append.o: VAR += to ${.TARGET} # To access the value of a global variable, use a variable expression. This # expression is expanded before parsing the whole dependency line. Since the -# expansion happens to the right of both the dependency operator ':' and also -# to the right of the assignment operator '=', the expanded text does not -# affect the dependency or the variable assignment structurally. The -# effective variable assignment, after expanding the whole line first, is thus +# expansion happens to the right of the dependency operator ':', the expanded +# text does not influence parsing of the dependency line. Since the expansion +# happens to the right of the assignment operator '=', the expanded text does +# not influence the parsing of the variable assignment. The effective +# variable assignment, after expanding the whole line first, is thus # 'VAR= global+local'. # expect: : Making var-scope-local-append-global.o with VAR="global+local". var-scope-local-append-global.o: VAR= ${VAR}+local @@ -182,17 +184,22 @@ var-scope-local-default.o: VAR ?= second # Using the variable assignment operator ':=' provides another way of # accessing a global variable and extending it with local modifications. The # '$' has to be written as '$$' though to survive the expansion of the -# dependency line as a whole. +# dependency line as a whole. After that, the parser sees the variable +# assignment as 'VAR := ${VAR}+local' and searches for the variable 'VAR' in +# the usual scopes, picking up the variable from the global scope. +# expect: : Making var-scope-local-subst.o with VAR="global+local". var-scope-local-subst.o: VAR := $${VAR}+local # The variable assignment operator '!=' assigns the output of the shell -# command, as everywhere else. +# command, as everywhere else. The shell command is run when the dependency +# line is parsed. var-scope-local-shell.o: VAR != echo output # While VAR=use will be set for a .USE node, it will never be seen since only # the ultimate target's context is searched; the variable assignments from the # .USE target are not copied to the ultimate target's. +# expect: : var-scope-local-use.o uses .USE VAR="global" a_use: .USE VAR=use : ${.TARGET} uses .USE VAR="${VAR}" Index: src/usr.bin/make/unit-tests/objdir-writable.mk diff -u src/usr.bin/make/unit-tests/objdir-writable.mk:1.5 src/usr.bin/make/unit-tests/objdir-writable.mk:1.6 --- src/usr.bin/make/unit-tests/objdir-writable.mk:1.5 Sun Jul 4 01:28:54 2021 +++ src/usr.bin/make/unit-tests/objdir-writable.mk Wed Feb 9 21:09:24 2022 @@ -1,4 +1,4 @@ -# $NetBSD: objdir-writable.mk,v 1.5 2021/07/04 01:28:54 sjg Exp $ +# $NetBSD: objdir-writable.mk,v 1.6 2022/02/09 21:09:24 rillig Exp $ # test checking for writable objdir @@ -29,4 +29,3 @@ ro-objdir: explicit-objdir: @MAKEOBJDIR=${TMPDIR} ${.MAKE} -r -f ${MAKEFILE:tA} -C ${TMPDIR} do-objdir -V .OBJDIR .endif - Index: src/usr.bin/make/unit-tests/opt-debug-parse.mk diff -u src/usr.bin/make/unit-tests/opt-debug-parse.mk:1.6 src/usr.bin/make/unit-tests/opt-debug-parse.mk:1.7 --- src/usr.bin/make/unit-tests/opt-debug-parse.mk:1.6 Sat Jan 8 23:52:26 2022 +++ src/usr.bin/make/unit-tests/opt-debug-parse.mk Wed Feb 9 21:09:24 2022 @@ -1,4 +1,4 @@ -# $NetBSD: opt-debug-parse.mk,v 1.6 2022/01/08 23:52:26 rillig Exp $ +# $NetBSD: opt-debug-parse.mk,v 1.7 2022/02/09 21:09:24 rillig Exp $ # # Tests for the -dp command line option, which adds debug logging about # makefile parsing. @@ -20,7 +20,7 @@ .info trace with multi-line .for loop head .endfor -# Before parse.c 1.461 from 2022-01-08, the debug log said it returned to +# Before parse.c 1.641 from 2022-01-08, the debug log said it returned to # the line of the '.include' instead of the line following it. .include "/dev/null" Index: src/usr.bin/make/unit-tests/varmod-order-numeric.mk diff -u src/usr.bin/make/unit-tests/varmod-order-numeric.mk:1.6 src/usr.bin/make/unit-tests/varmod-order-numeric.mk:1.7 --- src/usr.bin/make/unit-tests/varmod-order-numeric.mk:1.6 Fri Feb 4 23:43:10 2022 +++ src/usr.bin/make/unit-tests/varmod-order-numeric.mk Wed Feb 9 21:09:24 2022 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-order-numeric.mk,v 1.6 2022/02/04 23:43:10 rillig Exp $ +# $NetBSD: varmod-order-numeric.mk,v 1.7 2022/02/09 21:09:24 rillig Exp $ # # Tests for the variable modifiers ':On', which returns the words, sorted in # ascending numeric order, and for ':Orn' and ':Onr', which additionally @@ -32,7 +32,7 @@ NUMBERS= 3 5 7 1 42 -42 5K -3m 1M 1k -2G # Duplicate numbers are preserved in the output. In this case the # equal-valued numbers are spelled the same, so they are indistinguishable in # the output. -DUPLICATES= 3 1 2 2 1 1 # https://oeis.org/A034002 +DUPLICATES= 3 1 2 2 1 1 # subsequence of https://oeis.org/A034002 .if ${DUPLICATES:On} != "1 1 1 2 2 3" . error ${DUPLICATES:On} .endif @@ -44,7 +44,7 @@ SAME_VALUE:= ${:U 79 80 0x0050 81 :On} . error ${SAME_VALUE} .endif -# Hexadecimal and octal numbers are supported as well. +# Hexadecimal and octal numbers can be sorted as well. MIXED_BASE= 0 010 0x7 9 .if ${MIXED_BASE:On} != "0 0x7 010 9" . error ${MIXED_BASE:On} Index: src/usr.bin/make/unit-tests/suff-use.mk diff -u src/usr.bin/make/unit-tests/suff-use.mk:1.1 src/usr.bin/make/unit-tests/suff-use.mk:1.2 --- src/usr.bin/make/unit-tests/suff-use.mk:1.1 Mon Feb 7 22:43:50 2022 +++ src/usr.bin/make/unit-tests/suff-use.mk Wed Feb 9 21:09:24 2022 @@ -1,28 +1,28 @@ -# $NetBSD: suff-use.mk,v 1.1 2022/02/07 22:43:50 rillig Exp $ +# $NetBSD: suff-use.mk,v 1.2 2022/02/09 21:09:24 rillig Exp $ # # This test combines a .USE node with suffix rules, trying to add an # additional command before and after successful compilation of a .c file. # # History: -# bin/make-2001.11.12.21.58.18-plain +# make-2001.11.12.21.58.18 # | : 'Making demo.c out of nothing' # | make: don't know how to make demo.o. Stop # | -# | make: stopped in /home/rillig/proj/make-archive +# | make: stopped in <curdir> # | exit status 2 -# bin/make-2007.10.11.21.19.28-plain +# make-2007.10.11.21.19.28 # -# bin/make-2014.08.23.15.05.40-plain +# make-2014.08.23.15.05.40 # | : 'Making demo.c out of nothing' # | : 'Compiling demo.c to demo.o' # | exit status 0 -# bin/make-2014.09.05.06.57.20-plain +# make-2014.09.05.06.57.20 # -# bin/make-2014.09.07.20.55.34-plain +# make-2014.09.07.20.55.34 # | : 'Making demo.c out of nothing' # | make: don't know how to make demo.o. Stop # | -# | make: stopped in /home/rillig/proj/make-archive +# | make: stopped in <curdir> # | exit status 2 # ... # Index: src/usr.bin/make/unit-tests/varmod-assign.mk diff -u src/usr.bin/make/unit-tests/varmod-assign.mk:1.14 src/usr.bin/make/unit-tests/varmod-assign.mk:1.15 --- src/usr.bin/make/unit-tests/varmod-assign.mk:1.14 Sun Dec 5 10:13:44 2021 +++ src/usr.bin/make/unit-tests/varmod-assign.mk Wed Feb 9 21:09:24 2022 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-assign.mk,v 1.14 2021/12/05 10:13:44 rillig Exp $ +# $NetBSD: varmod-assign.mk,v 1.15 2022/02/09 21:09:24 rillig Exp $ # # Tests for the obscure ::= variable modifiers, which perform variable # assignments during evaluation, just like the = operator in C. @@ -34,8 +34,8 @@ all: mod-assign-shell-error . error .endif -# The assignments happen in the global scope and thus are preserved even after -# the shell command has been run and the condition has been evaluated. +# The assignments were performed as part of .if conditions and thus happened +# in the command line scope. .if "${FIRST}, ${LAST}, ${APPENDED}, ${RAN}" != "1, 3, 1 2 3, <3>" . error .endif @@ -84,7 +84,8 @@ mod-assign-empty: mod-assign-parse: # The modifier for assignment operators starts with a ':'. # An 'x' after that is an invalid modifier. - @echo ${ASSIGN::x} # 'x' is an unknown assignment operator + # expect: make: Unknown modifier ":x" + @echo ${ASSIGN::x} # When parsing an assignment operator fails because the operator is # incomplete, make falls back to the SysV modifier. Index: src/usr.bin/make/unit-tests/varmod-to-separator.mk diff -u src/usr.bin/make/unit-tests/varmod-to-separator.mk:1.10 src/usr.bin/make/unit-tests/varmod-to-separator.mk:1.11 --- src/usr.bin/make/unit-tests/varmod-to-separator.mk:1.10 Sun Jan 23 21:48:59 2022 +++ src/usr.bin/make/unit-tests/varmod-to-separator.mk Wed Feb 9 21:09:24 2022 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-to-separator.mk,v 1.10 2022/01/23 21:48:59 rillig Exp $ +# $NetBSD: varmod-to-separator.mk,v 1.11 2022/02/09 21:09:24 rillig Exp $ # # Tests for the :ts variable modifier, which joins the words of the variable # using an arbitrary character as word separator. @@ -208,7 +208,7 @@ WORDS= one two three four five six . error .endif -# The word separator must be can only be a single character. +# The word separator can only be a single character. # expect: make: Bad modifier ":ts\X" for variable "WORDS" .if ${WORDS:ts\X} . error