Module Name: src
Committed By: rillig
Date: Sat Oct 24 08:50:17 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: cond-short.mk directive-for.mk dotwait.mk
escape.mk export-all.mk export-env.mk export.mk forloop.mk
job-output-long-lines.mk moderrs.mk modmatch.mk modmisc.mk modts.mk
modword.mk opt-debug-lint.mk posix1.mk qequals.mk recursive.mk
sunshcmd.mk sysv.mk unexport-env.mk unexport.mk var-op-append.mk
var-op-assign.mk varcmd.mk varmisc.mk varname-dot-parsedir.mk
varname-dot-parsefile.mk varshell.mk
Log Message:
make(1): use consistent indentation in variable assignments
Initial work by "pkglint -F *.mk", manually adjusted in a few places.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/cond-short.mk \
src/usr.bin/make/unit-tests/opt-debug-lint.mk
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/directive-for.mk \
src/usr.bin/make/unit-tests/forloop.mk \
src/usr.bin/make/unit-tests/posix1.mk \
src/usr.bin/make/unit-tests/var-op-append.mk \
src/usr.bin/make/unit-tests/var-op-assign.mk \
src/usr.bin/make/unit-tests/varname-dot-parsedir.mk
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/dotwait.mk \
src/usr.bin/make/unit-tests/job-output-long-lines.mk \
src/usr.bin/make/unit-tests/modword.mk \
src/usr.bin/make/unit-tests/qequals.mk \
src/usr.bin/make/unit-tests/recursive.mk \
src/usr.bin/make/unit-tests/sunshcmd.mk
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/escape.mk
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/export-all.mk \
src/usr.bin/make/unit-tests/unexport.mk \
src/usr.bin/make/unit-tests/varcmd.mk \
src/usr.bin/make/unit-tests/varname-dot-parsefile.mk
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/export-env.mk \
src/usr.bin/make/unit-tests/unexport-env.mk \
src/usr.bin/make/unit-tests/varshell.mk
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/export.mk
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/make/unit-tests/moderrs.mk
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/modmatch.mk
cvs rdiff -u -r1.48 -r1.49 src/usr.bin/make/unit-tests/modmisc.mk
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/modts.mk
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/sysv.mk
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/make/unit-tests/varmisc.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/unit-tests/cond-short.mk
diff -u src/usr.bin/make/unit-tests/cond-short.mk:1.10 src/usr.bin/make/unit-tests/cond-short.mk:1.11
--- src/usr.bin/make/unit-tests/cond-short.mk:1.10 Sat Oct 24 08:46:08 2020
+++ src/usr.bin/make/unit-tests/cond-short.mk Sat Oct 24 08:50:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: cond-short.mk,v 1.10 2020/10/24 08:46:08 rillig Exp $
+# $NetBSD: cond-short.mk,v 1.11 2020/10/24 08:50:17 rillig Exp $
#
# Demonstrates that in conditions, the right-hand side of an && or ||
# is only evaluated if it can actually influence the result.
@@ -113,59 +113,59 @@ VAR= # empty again, for the following te
# make sure these do not cause complaint
#.MAKEFLAGS: -dc
-V42 = 42
-iV1 = ${V42}
-iV2 = ${V66}
+V42= 42
+iV1= ${V42}
+iV2= ${V66}
.if defined(V42) && ${V42} > 0
-x=Ok
+x= Ok
.else
-x=Fail
+x= Fail
.endif
-x!= echo 'defined(V42) && ${V42} > 0: $x' >&2; echo
+x!= echo 'defined(V42) && ${V42} > 0: $x' >&2; echo
# this one throws both String comparison operator and
# Malformed conditional with cond.c 1.78
# indirect iV2 would expand to "" and treated as 0
.if defined(V66) && ( ${iV2} < ${V42} )
-x=Fail
+x= Fail
.else
-x=Ok
+x= Ok
.endif
-x!= echo 'defined(V66) && ( "${iV2}" < ${V42} ): $x' >&2; echo
+x!= echo 'defined(V66) && ( "${iV2}" < ${V42} ): $x' >&2; echo
# next two thow String comparison operator with cond.c 1.78
# indirect iV1 would expand to 42
.if 1 || ${iV1} < ${V42}
-x=Ok
+x= Ok
.else
-x=Fail
+x= Fail
.endif
-x!= echo '1 || ${iV1} < ${V42}: $x' >&2; echo
+x!= echo '1 || ${iV1} < ${V42}: $x' >&2; echo
.if 1 || ${iV2:U2} < ${V42}
-x=Ok
+x= Ok
.else
-x=Fail
+x= Fail
.endif
-x!= echo '1 || ${iV2:U2} < ${V42}: $x' >&2; echo
+x!= echo '1 || ${iV2:U2} < ${V42}: $x' >&2; echo
# the same expressions are fine when the lhs is expanded
# ${iV1} expands to 42
.if 0 || ${iV1} <= ${V42}
-x=Ok
+x= Ok
.else
-x=Fail
+x= Fail
.endif
-x!= echo '0 || ${iV1} <= ${V42}: $x' >&2; echo
+x!= echo '0 || ${iV1} <= ${V42}: $x' >&2; echo
# ${iV2:U2} expands to 2
.if 0 || ${iV2:U2} < ${V42}
-x=Ok
+x= Ok
.else
-x=Fail
+x= Fail
.endif
-x!= echo '0 || ${iV2:U2} < ${V42}: $x' >&2; echo
+x!= echo '0 || ${iV2:U2} < ${V42}: $x' >&2; echo
all:
@:;:
Index: src/usr.bin/make/unit-tests/opt-debug-lint.mk
diff -u src/usr.bin/make/unit-tests/opt-debug-lint.mk:1.10 src/usr.bin/make/unit-tests/opt-debug-lint.mk:1.11
--- src/usr.bin/make/unit-tests/opt-debug-lint.mk:1.10 Mon Oct 5 19:27:48 2020
+++ src/usr.bin/make/unit-tests/opt-debug-lint.mk Sat Oct 24 08:50:17 2020
@@ -1,8 +1,8 @@
-# $NetBSD: opt-debug-lint.mk,v 1.10 2020/10/05 19:27:48 rillig Exp $
+# $NetBSD: opt-debug-lint.mk,v 1.11 2020/10/24 08:50:17 rillig Exp $
#
# Tests for the -dL command line option, which runs additional checks
# to catch common mistakes, such as unclosed variable expressions.
-
+
.MAKEFLAGS: -dL
# Since 2020-09-13, undefined variables that are used on the left-hand side
Index: src/usr.bin/make/unit-tests/directive-for.mk
diff -u src/usr.bin/make/unit-tests/directive-for.mk:1.5 src/usr.bin/make/unit-tests/directive-for.mk:1.6
--- src/usr.bin/make/unit-tests/directive-for.mk:1.5 Tue Sep 22 19:08:48 2020
+++ src/usr.bin/make/unit-tests/directive-for.mk Sat Oct 24 08:50:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: directive-for.mk,v 1.5 2020/09/22 19:08:48 rillig Exp $
+# $NetBSD: directive-for.mk,v 1.6 2020/10/24 08:50:17 rillig Exp $
#
# Tests for the .for directive.
@@ -81,8 +81,8 @@ var2= value before
# Since that date, the .for loop expands to:
# EXPANSION${:U+}= value
#
-EXPANSION= before
-EXPANSION+ = before
+EXPANSION= before
+EXPANSION+ = before
.for plus in +
EXPANSION${plus}= value
.endfor
Index: src/usr.bin/make/unit-tests/forloop.mk
diff -u src/usr.bin/make/unit-tests/forloop.mk:1.5 src/usr.bin/make/unit-tests/forloop.mk:1.6
--- src/usr.bin/make/unit-tests/forloop.mk:1.5 Sat Oct 24 08:46:08 2020
+++ src/usr.bin/make/unit-tests/forloop.mk Sat Oct 24 08:50:17 2020
@@ -1,50 +1,50 @@
-# $NetBSD: forloop.mk,v 1.5 2020/10/24 08:46:08 rillig Exp $
+# $NetBSD: forloop.mk,v 1.6 2020/10/24 08:50:17 rillig Exp $
all: for-loop
-LIST = one "two and three" four "five"
+LIST= one "two and three" four "five"
.if make(for-fail)
for-fail:
-XTRA_LIST = xtra
+XTRA_LIST= xtra
.else
. for x in ${LIST}
-X!= echo 'x=$x' >&2; echo
+X!= echo 'x=$x' >&2; echo
. endfor
-CFL = -I/this -I"This or that" -Ithat "-DTHIS=\"this and that\""
+CFL= -I/this -I"This or that" -Ithat "-DTHIS=\"this and that\""
cfl=
. for x in ${CFL}
-X!= echo 'x=$x' >&2; echo
+X!= echo 'x=$x' >&2; echo
. if empty(cfl)
-cfl= $x
+cfl= $x
. else
-cfl+= $x
+cfl+= $x
. endif
. endfor
-X!= echo 'cfl=${cfl}' >&2; echo
+X!= echo 'cfl=${cfl}' >&2; echo
. if ${cfl} != ${CFL}
. error ${.newline}'${cfl}' != ${.newline}'${CFL}'
. endif
. for a b in ${EMPTY}
-X!= echo 'a=$a b=$b' >&2; echo
+X!= echo 'a=$a b=$b' >&2; echo
. endfor
# Since at least 1993, iteration stops at the first newline.
# Back then, the .newline variable didn't exist, therefore it was unlikely
# that a newline ever occurred.
. for var in a${.newline}b${.newline}c
-X!= echo 'newline-item=('${var:Q}')' 1>&2; echo
+X!= echo 'newline-item=('${var:Q}')' 1>&2; echo
. endfor
.endif # for-fail
.for a b in ${LIST} ${LIST:tu} ${XTRA_LIST}
-X!= echo 'a=$a b=$b' >&2; echo
+X!= echo 'a=$a b=$b' >&2; echo
.endfor
for-loop:
Index: src/usr.bin/make/unit-tests/posix1.mk
diff -u src/usr.bin/make/unit-tests/posix1.mk:1.5 src/usr.bin/make/unit-tests/posix1.mk:1.6
--- src/usr.bin/make/unit-tests/posix1.mk:1.5 Sun Sep 27 21:35:16 2020
+++ src/usr.bin/make/unit-tests/posix1.mk Sat Oct 24 08:50:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: posix1.mk,v 1.5 2020/09/27 21:35:16 rillig Exp $
+# $NetBSD: posix1.mk,v 1.6 2020/10/24 08:50:17 rillig Exp $
# Keep the default suffixes from interfering, just in case.
.SUFFIXES:
@@ -55,14 +55,14 @@ suffix-substitution:
# In the past substitutions did not work with the D/F forms and those
# forms were not available for $?. (PR 49085)
-ARFLAGS = -rcv
+ARFLAGS= -rcv
localvars: lib.a
# $@ = target or archive name $< = implied source
# $* = target without suffix $? = sources newer than target
# $% = archive member name
-LOCALS = \
+LOCALS= \
"Local variables\n\
\$${@}=\"${@}\" \$${<}=\"${<}\"\n\
\$${*}=\"${*}\" \$${?}=\"${?}\"\n\
@@ -70,7 +70,7 @@ LOCALS = \
# $XD = directory part of X $XF = file part of X
# X is one of the local variables.
-LOCAL_ALTERNATIVES = \
+LOCAL_ALTERNATIVES= \
"Directory and filename parts of local variables\n\
\$${@D}=\"${@D}\" \$${@F}=\"${@F}\"\n\
\$${<D}=\"${<D}\" \$${<F}=\"${<F}\"\n\
@@ -80,15 +80,15 @@ LOCAL_ALTERNATIVES = \
# Do all kinds of meaningless substitutions on local variables to see
# if they work. Add, remove and replace things.
-VAR2 = .o
-VAR3 = foo
-LOCAL_SUBSTITUTIONS = \
+VAR2= .o
+VAR3= foo
+LOCAL_SUBSTITUTIONS= \
"Local variable substitutions\n\
\$${@:.o=}=\"${@:.o=}\" \$${<:.c=.C}=\"${<:.c=.C}\"\n\
\$${*:=.h}=\"${*:=.h}\" \$${?:.h=.H}=\"${?:.h=.H}\"\n\
\$${%%:=}=\"${%:=}\"\n\n"
-LOCAL_ALTERNATIVE_SUBSTITUTIONS = \
+LOCAL_ALTERNATIVE_SUBSTITUTIONS= \
"Target with suffix transformations\n\
\$${@D:=append}=\"${@D:=append}\"\n\
\$${@F:.o=.O}=\"${@F:.o=.O}\"\n\
Index: src/usr.bin/make/unit-tests/var-op-append.mk
diff -u src/usr.bin/make/unit-tests/var-op-append.mk:1.5 src/usr.bin/make/unit-tests/var-op-append.mk:1.6
--- src/usr.bin/make/unit-tests/var-op-append.mk:1.5 Mon Oct 5 19:27:48 2020
+++ src/usr.bin/make/unit-tests/var-op-append.mk Sat Oct 24 08:50:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: var-op-append.mk,v 1.5 2020/10/05 19:27:48 rillig Exp $
+# $NetBSD: var-op-append.mk,v 1.6 2020/10/24 08:50:17 rillig Exp $
#
# Tests for the += variable assignment operator, which appends to a variable,
# creating it if necessary.
@@ -27,7 +27,7 @@ VAR+= # empty
# part of the assignment operator.
#
# See Parse_DoVar
-C++=value
+C++= value
.if ${C+} != "value" || defined(C++)
. error
.endif
Index: src/usr.bin/make/unit-tests/var-op-assign.mk
diff -u src/usr.bin/make/unit-tests/var-op-assign.mk:1.5 src/usr.bin/make/unit-tests/var-op-assign.mk:1.6
--- src/usr.bin/make/unit-tests/var-op-assign.mk:1.5 Sat Oct 24 08:46:08 2020
+++ src/usr.bin/make/unit-tests/var-op-assign.mk Sat Oct 24 08:50:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: var-op-assign.mk,v 1.5 2020/10/24 08:46:08 rillig Exp $
+# $NetBSD: var-op-assign.mk,v 1.6 2020/10/24 08:50:17 rillig Exp $
#
# Tests for the = variable assignment operator, which overwrites an existing
# variable or creates it.
@@ -26,7 +26,7 @@ VAR= value
# The '$' needs to be escaped with another '$', otherwise it would refer to
# another variable.
#
-VAR =new value and \# some $$ special characters # comment
+VAR= new value and \# some $$ special characters # comment
# When a string literal appears in a condition, the escaping rules are
# different. Run make with the -dc option to see the details.
Index: src/usr.bin/make/unit-tests/varname-dot-parsedir.mk
diff -u src/usr.bin/make/unit-tests/varname-dot-parsedir.mk:1.5 src/usr.bin/make/unit-tests/varname-dot-parsedir.mk:1.6
--- src/usr.bin/make/unit-tests/varname-dot-parsedir.mk:1.5 Mon Sep 21 03:45:29 2020
+++ src/usr.bin/make/unit-tests/varname-dot-parsedir.mk Sat Oct 24 08:50:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: varname-dot-parsedir.mk,v 1.5 2020/09/21 03:45:29 rillig Exp $
+# $NetBSD: varname-dot-parsedir.mk,v 1.6 2020/10/24 08:50:17 rillig Exp $
#
# Tests for the special .PARSEDIR variable, which contains the directory part
# of the file that is currently parsed.
@@ -30,7 +30,7 @@
# There is absolutely no point in faking the location of the file that is
# being parsed. Technically, it's possible though, but only if the file
# being parsed is a relative pathname. See PrintLocation for details.
-.PARSEDIR = /fake-absolute-path
+.PARSEDIR= /fake-absolute-path
.info The location can be faked in some cases.
# After including another file, .PARSEDIR is reset.
Index: src/usr.bin/make/unit-tests/dotwait.mk
diff -u src/usr.bin/make/unit-tests/dotwait.mk:1.2 src/usr.bin/make/unit-tests/dotwait.mk:1.3
--- src/usr.bin/make/unit-tests/dotwait.mk:1.2 Sun Oct 8 20:44:19 2017
+++ src/usr.bin/make/unit-tests/dotwait.mk Sat Oct 24 08:50:17 2020
@@ -1,9 +1,9 @@
-# $NetBSD: dotwait.mk,v 1.2 2017/10/08 20:44:19 sjg Exp $
+# $NetBSD: dotwait.mk,v 1.3 2020/10/24 08:50:17 rillig Exp $
-THISMAKEFILE:= ${.PARSEDIR}/${.PARSEFILE}
+THISMAKEFILE:= ${.PARSEDIR}/${.PARSEFILE}
-TESTS= simple recursive shared cycle
-PAUSE= sleep 1
+TESTS= simple recursive shared cycle
+PAUSE= sleep 1
# Use a .for loop rather than dependencies here, to ensure
# that the tests are run one by one, with parallelism
Index: src/usr.bin/make/unit-tests/job-output-long-lines.mk
diff -u src/usr.bin/make/unit-tests/job-output-long-lines.mk:1.2 src/usr.bin/make/unit-tests/job-output-long-lines.mk:1.3
--- src/usr.bin/make/unit-tests/job-output-long-lines.mk:1.2 Tue Sep 29 18:16:24 2020
+++ src/usr.bin/make/unit-tests/job-output-long-lines.mk Sat Oct 24 08:50:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: job-output-long-lines.mk,v 1.2 2020/09/29 18:16:24 rillig Exp $
+# $NetBSD: job-output-long-lines.mk,v 1.3 2020/10/24 08:50:17 rillig Exp $
#
# The jobs may produce long lines of output. A practical case are the echoed
# command lines from compiler invocations, with their many -D options.
@@ -6,7 +6,7 @@
# Each of these lines must be written atomically to the actual output.
# The markers for switching jobs must always be written at the beginning of
# the line, to make them clearly visible in large log files.
-#
+#
# As of 2020-09-27, the default job buffer size is 1024. When a job produces
# output lines that are longer than this buffer size, these output pieces are
# not terminated by a newline. Because of this missing newline, the job
Index: src/usr.bin/make/unit-tests/modword.mk
diff -u src/usr.bin/make/unit-tests/modword.mk:1.2 src/usr.bin/make/unit-tests/modword.mk:1.3
--- src/usr.bin/make/unit-tests/modword.mk:1.2 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/modword.mk Sat Oct 24 08:50:17 2020
@@ -1,22 +1,22 @@
-# $NetBSD: modword.mk,v 1.2 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: modword.mk,v 1.3 2020/10/24 08:50:17 rillig Exp $
#
# Test behaviour of new :[] modifier
all: mod-squarebrackets mod-S-W mod-C-W mod-tW-tw
-LIST= one two three
-LIST+= four five six
-LONGLIST= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
-
-EMPTY= # the space should be ignored
-ESCAPEDSPACE=\ # escaped space before the '#'
-REALLYSPACE:=${EMPTY:C/^/ /W}
-HASH= \#
-AT= @
-STAR= *
-ZERO= 0
-ONE= 1
-MINUSONE= -1
+LIST= one two three
+LIST+= four five six
+LONGLIST= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
+
+EMPTY= # the space should be ignored
+ESCAPEDSPACE= \ # escaped space before the '#'
+REALLYSPACE:= ${EMPTY:C/^/ /W}
+HASH= \#
+AT= @
+STAR= *
+ZERO= 0
+ONE= 1
+MINUSONE= -1
mod-squarebrackets: mod-squarebrackets-0-star-at \
mod-squarebrackets-hash \
Index: src/usr.bin/make/unit-tests/qequals.mk
diff -u src/usr.bin/make/unit-tests/qequals.mk:1.2 src/usr.bin/make/unit-tests/qequals.mk:1.3
--- src/usr.bin/make/unit-tests/qequals.mk:1.2 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/qequals.mk Sat Oct 24 08:50:17 2020
@@ -1,8 +1,8 @@
-# $NetBSD: qequals.mk,v 1.2 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: qequals.mk,v 1.3 2020/10/24 08:50:17 rillig Exp $
-M= i386
-V.i386= OK
-V.$M ?= bug
+M= i386
+V.i386= OK
+V.$M?= bug
all:
@echo 'V.$M ?= ${V.$M}'
Index: src/usr.bin/make/unit-tests/recursive.mk
diff -u src/usr.bin/make/unit-tests/recursive.mk:1.2 src/usr.bin/make/unit-tests/recursive.mk:1.3
--- src/usr.bin/make/unit-tests/recursive.mk:1.2 Thu Aug 6 05:52:45 2020
+++ src/usr.bin/make/unit-tests/recursive.mk Sat Oct 24 08:50:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: recursive.mk,v 1.2 2020/08/06 05:52:45 rillig Exp $
+# $NetBSD: recursive.mk,v 1.3 2020/10/24 08:50:17 rillig Exp $
#
# In -dL mode, a variable may get expanded before it makes sense.
# This would stop make from doing anything since the "recursive" error
@@ -11,16 +11,16 @@
# Seen in pkgsrc/x11/libXfixes, and probably many more package that use
# GNU Automake.
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
-am__v_lt_0 = --silent
-am__v_lt_1 =
+AM_V_lt= ${am__v_lt_${V}}
+am__v_lt_= ${am__v_lt_${AM_DEFAULT_VERBOSITY}}
+am__v_lt_0= --silent
+am__v_lt_1=
# On 2020-08-06, make reported: "Variable am__v_lt_ is recursive."
-libXfixes_la_LINK = ... $(AM_V_lt) ...
+libXfixes_la_LINK= ... ${AM_V_lt} ...
# somewhere later ...
-AM_DEFAULT_VERBOSITY = 1
+AM_DEFAULT_VERBOSITY= 1
# The purpose of the -dL flag is to detect unclosed variables. This
@@ -31,7 +31,7 @@ AM_DEFAULT_VERBOSITY = 1
# therefore that's acceptable. In most practical cases, the missing
# brace would be detected directly in the line where it is produced.
MISSING_BRACE_INDIRECT:= ${:U\${MISSING_BRACE}
-UNCLOSED = $(MISSING_PAREN
-UNCLOSED = ${MISSING_BRACE
-UNCLOSED = ${MISSING_BRACE_INDIRECT}
+UNCLOSED= $(MISSING_PAREN
+UNCLOSED= ${MISSING_BRACE
+UNCLOSED= ${MISSING_BRACE_INDIRECT}
Index: src/usr.bin/make/unit-tests/sunshcmd.mk
diff -u src/usr.bin/make/unit-tests/sunshcmd.mk:1.2 src/usr.bin/make/unit-tests/sunshcmd.mk:1.3
--- src/usr.bin/make/unit-tests/sunshcmd.mk:1.2 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/sunshcmd.mk Sat Oct 24 08:50:17 2020
@@ -1,10 +1,10 @@
-# $NetBSD: sunshcmd.mk,v 1.2 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: sunshcmd.mk,v 1.3 2020/10/24 08:50:17 rillig Exp $
-BYECMD = echo bye
-LATERCMD = echo later
+BYECMD= echo bye
+LATERCMD= echo later
TEST1 :sh = echo hello
TEST2 :sh = ${BYECMD}
-TEST3 = ${LATERCMD:sh}
+TEST3= ${LATERCMD:sh}
all:
@echo "TEST1=${TEST1}"
Index: src/usr.bin/make/unit-tests/escape.mk
diff -u src/usr.bin/make/unit-tests/escape.mk:1.12 src/usr.bin/make/unit-tests/escape.mk:1.13
--- src/usr.bin/make/unit-tests/escape.mk:1.12 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/escape.mk Sat Oct 24 08:50:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: escape.mk,v 1.12 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: escape.mk,v 1.13 2020/10/24 08:50:17 rillig Exp $
#
# Test backslash escaping.
@@ -44,8 +44,8 @@ all: .PHONY
# Some variables to be expanded in tests
#
-a = aaa
-A = ${a}
+a= aaa
+A= ${a}
# Backslash at end of line in a comment\
should continue the comment. \
@@ -57,13 +57,13 @@ __printvars: .USE .MADE
# Embedded backslash in variable should be taken literally.
#
-VAR1BS = 111\111
-VAR1BSa = 111\${a}
-VAR1BSA = 111\${A}
-VAR1BSda = 111\$${a}
-VAR1BSdA = 111\$${A}
-VAR1BSc = 111\# backslash escapes comment char, so this is part of the value
-VAR1BSsc = 111\ # This is a comment. Value ends with <backslash><space>
+VAR1BS= 111\111
+VAR1BSa= 111\${a}
+VAR1BSA= 111\${A}
+VAR1BSda= 111\$${a}
+VAR1BSdA= 111\$${A}
+VAR1BSc= 111\# backslash escapes comment char, so this is part of the value
+VAR1BSsc= 111\ # This is a comment. Value ends with <backslash><space>
all: var-1bs
var-1bs: .PHONY __printvars VAR1BS VAR1BSa VAR1BSA VAR1BSda VAR1BSdA \
@@ -71,13 +71,13 @@ var-1bs: .PHONY __printvars VAR1BS VAR1B
# Double backslash in variable should be taken as two literal backslashes.
#
-VAR2BS = 222\\222
-VAR2BSa = 222\\${a}
-VAR2BSA = 222\\${A}
-VAR2BSda = 222\\$${a}
-VAR2BSdA = 222\\$${A}
-VAR2BSc = 222\\# backslash does not escape comment char, so this is a comment
-VAR2BSsc = 222\\ # This is a comment. Value ends with <backslash><backslash>
+VAR2BS= 222\\222
+VAR2BSa= 222\\${a}
+VAR2BSA= 222\\${A}
+VAR2BSda= 222\\$${a}
+VAR2BSdA= 222\\$${A}
+VAR2BSc= 222\\# backslash does not escape comment char, so this is a comment
+VAR2BSsc= 222\\ # This is a comment. Value ends with <backslash><backslash>
all: var-2bs
var-2bs: .PHONY __printvars VAR2BS VAR2BSa VAR2BSA VAR2BSda VAR2BSdA \
@@ -85,19 +85,19 @@ var-2bs: .PHONY __printvars VAR2BS VAR2B
# Backslash-newline in a variable setting is replaced by a single space.
#
-VAR1BSNL = 111\
+VAR1BSNL= 111\
111
-VAR1BSNLa = 111\
+VAR1BSNLa= 111\
${a}
-VAR1BSNLA = 111\
+VAR1BSNLA= 111\
${A}
-VAR1BSNLda = 111\
+VAR1BSNLda= 111\
$${a}
-VAR1BSNLdA = 111\
+VAR1BSNLdA= 111\
$${A}
-VAR1BSNLc = 111\
+VAR1BSNLc= 111\
# this should be processed as a comment
-VAR1BSNLsc = 111\
+VAR1BSNLsc= 111\
# this should be processed as a comment
all: var-1bsnl
@@ -113,19 +113,19 @@ var-1bsnl: .PHONY __printvars \
# generate syntax errors regardless of whether or not they are
# treated as part of the value.
#
-VAR2BSNL = 222\\
+VAR2BSNL= 222\\
222=
-VAR2BSNLa = 222\\
+VAR2BSNLa= 222\\
${a}=
-VAR2BSNLA = 222\\
+VAR2BSNLA= 222\\
${A}=
-VAR2BSNLda = 222\\
+VAR2BSNLda= 222\\
$${a}=
-VAR2BSNLdA = 222\\
+VAR2BSNLdA= 222\\
$${A}=
-VAR2BSNLc = 222\\
+VAR2BSNLc= 222\\
# this should be processed as a comment
-VAR2BSNLsc = 222\\
+VAR2BSNLsc= 222\\
# this should be processed as a comment
all: var-2bsnl
@@ -140,19 +140,19 @@ var-2bsnl: .PHONY __printvars \
# generate syntax errors regardless of whether or not they are
# treated as part of the value.
#
-VAR3BSNL = 333\\\
+VAR3BSNL= 333\\\
333=
-VAR3BSNLa = 333\\\
+VAR3BSNLa= 333\\\
${a}=
-VAR3BSNLA = 333\\\
+VAR3BSNLA= 333\\\
${A}=
-VAR3BSNLda = 333\\\
+VAR3BSNLda= 333\\\
$${a}=
-VAR3BSNLdA = 333\\\
+VAR3BSNLdA= 333\\\
$${A}=
-VAR3BSNLc = 333\\\
+VAR3BSNLc= 333\\\
# this should be processed as a comment
-VAR3BSNLsc = 333\\\
+VAR3BSNLsc= 333\\\
# this should be processed as a comment
all: var-3bsnl
@@ -163,20 +163,20 @@ var-3bsnl: .PHONY __printvars \
# Backslash-newline in a variable setting, plus any amount of white space
# on the next line, is replaced by a single space.
#
-VAR1BSNL00= first line\
+VAR1BSNL00= first line\
# above line is entirely empty, and this is a comment
-VAR1BSNL0= first line\
+VAR1BSNL0= first line\
no space on second line
-VAR1BSNLs= first line\
+VAR1BSNLs= first line\
one space on second line
-VAR1BSNLss= first line\
+VAR1BSNLss= first line\
two spaces on second line
-VAR1BSNLt= first line\
+VAR1BSNLt= first line\
one tab on second line
-VAR1BSNLtt= first line\
+VAR1BSNLtt= first line\
two tabs on second line
-VAR1BSNLxx= first line\
+VAR1BSNLxx= first line\
many spaces and tabs [ ] on second line
all: var-1bsnl-space
Index: src/usr.bin/make/unit-tests/export-all.mk
diff -u src/usr.bin/make/unit-tests/export-all.mk:1.4 src/usr.bin/make/unit-tests/export-all.mk:1.5
--- src/usr.bin/make/unit-tests/export-all.mk:1.4 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/export-all.mk Sat Oct 24 08:50:17 2020
@@ -1,24 +1,24 @@
-# $NetBSD: export-all.mk,v 1.4 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: export-all.mk,v 1.5 2020/10/24 08:50:17 rillig Exp $
-UT_OK=good
-UT_F=fine
+UT_OK= good
+UT_F= fine
# the old way to do :tA
-M_tAbad = C,.*,cd & \&\& 'pwd',:sh
+M_tAbad= C,.*,cd & \&\& 'pwd',:sh
# the new
-M_tA = tA
+M_tA= tA
here := ${.PARSEDIR}
# this will cause trouble (recursing if we let it)
-UT_BADDIR = ${${here}/../${here:T}:L:${M_tAbad}:T}
+UT_BADDIR= ${${here}/../${here:T}:L:${M_tAbad}:T}
# this will be ok
-UT_OKDIR = ${${here}/../${here:T}:L:${M_tA}:T}
+UT_OKDIR= ${${here}/../${here:T}:L:${M_tA}:T}
.export
FILTER_CMD= grep ^UT_
.include "export.mk"
-UT_TEST=export-all
-UT_ALL=even this gets exported
+UT_TEST= export-all
+UT_ALL= even this gets exported
Index: src/usr.bin/make/unit-tests/unexport.mk
diff -u src/usr.bin/make/unit-tests/unexport.mk:1.4 src/usr.bin/make/unit-tests/unexport.mk:1.5
--- src/usr.bin/make/unit-tests/unexport.mk:1.4 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/unexport.mk Sat Oct 24 08:50:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: unexport.mk,v 1.4 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: unexport.mk,v 1.5 2020/10/24 08:50:17 rillig Exp $
# pick up a bunch of exported vars
FILTER_CMD= grep ^UT_
@@ -6,7 +6,7 @@ FILTER_CMD= grep ^UT_
.unexport UT_ZOO UT_FOO
-UT_TEST = unexport
+UT_TEST= unexport
# Until 2020-08-08, Var_UnExport had special handling for '\n', that code
# was not reachable though. At that point, backslash-newline has already
Index: src/usr.bin/make/unit-tests/varcmd.mk
diff -u src/usr.bin/make/unit-tests/varcmd.mk:1.4 src/usr.bin/make/unit-tests/varcmd.mk:1.5
--- src/usr.bin/make/unit-tests/varcmd.mk:1.4 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/varcmd.mk Sat Oct 24 08:50:17 2020
@@ -1,13 +1,13 @@
-# $NetBSD: varcmd.mk,v 1.4 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: varcmd.mk,v 1.5 2020/10/24 08:50:17 rillig Exp $
#
# Test behaviour of recursive make and vars set on command line.
-FU=fu
-FOO?=foo
+FU= fu
+FOO?= foo
.if !empty(.TARGETS)
-TAG=${.TARGETS}
+TAG= ${.TARGETS}
.endif
-TAG?=default
+TAG?= default
all: one
@@ -43,11 +43,11 @@ VAR=Internal
four: show
@${.MAKE} -f ${MAKEFILE} five
-M = x
-V.y = is y
-V.x = is x
-V := ${V.$M}
-K := ${V}
+M= x
+V.y= is y
+V.x= is x
+V:= ${V.$M}
+K:= ${V}
show-v:
@echo '${TAG} v=${V} k=${K}'
Index: src/usr.bin/make/unit-tests/varname-dot-parsefile.mk
diff -u src/usr.bin/make/unit-tests/varname-dot-parsefile.mk:1.4 src/usr.bin/make/unit-tests/varname-dot-parsefile.mk:1.5
--- src/usr.bin/make/unit-tests/varname-dot-parsefile.mk:1.4 Mon Sep 21 03:45:29 2020
+++ src/usr.bin/make/unit-tests/varname-dot-parsefile.mk Sat Oct 24 08:50:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: varname-dot-parsefile.mk,v 1.4 2020/09/21 03:45:29 rillig Exp $
+# $NetBSD: varname-dot-parsefile.mk,v 1.5 2020/10/24 08:50:17 rillig Exp $
#
# Tests for the special .PARSEFILE variable, which contains the basename part
# of the file that is currently parsed.
@@ -25,7 +25,7 @@
# There is absolutely no point in faking the location of the file that is
# being parsed. Technically, it's possible though, but only if the file
# being parsed is a relative pathname. See PrintLocation for details.
-.PARSEFILE = fake-parsefile
+.PARSEFILE= fake-parsefile
.info The location can be faked in some cases.
# After including another file, .PARSEFILE is reset.
Index: src/usr.bin/make/unit-tests/export-env.mk
diff -u src/usr.bin/make/unit-tests/export-env.mk:1.3 src/usr.bin/make/unit-tests/export-env.mk:1.4
--- src/usr.bin/make/unit-tests/export-env.mk:1.3 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/export-env.mk Sat Oct 24 08:50:17 2020
@@ -1,14 +1,14 @@
-# $NetBSD: export-env.mk,v 1.3 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: export-env.mk,v 1.4 2020/10/24 08:50:17 rillig Exp $
# our normal .export, subsequent changes affect the environment
-UT_TEST=this
+UT_TEST= this
.export UT_TEST
-UT_TEST:= ${.PARSEFILE}
+UT_TEST:= ${.PARSEFILE}
# not so with .export-env
-UT_ENV=exported
+UT_ENV= exported
.export-env UT_ENV
-UT_ENV=not-exported
+UT_ENV= not-exported
# gmake style export goes further; affects nothing but the environment
UT_EXP=before-export
Index: src/usr.bin/make/unit-tests/unexport-env.mk
diff -u src/usr.bin/make/unit-tests/unexport-env.mk:1.3 src/usr.bin/make/unit-tests/unexport-env.mk:1.4
--- src/usr.bin/make/unit-tests/unexport-env.mk:1.3 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/unexport-env.mk Sat Oct 24 08:50:17 2020
@@ -1,14 +1,14 @@
-# $NetBSD: unexport-env.mk,v 1.3 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: unexport-env.mk,v 1.4 2020/10/24 08:50:17 rillig Exp $
# pick up a bunch of exported vars
FILTER_CMD= grep ^UT_
.include "export.mk"
# an example of setting up a minimal environment.
-PATH = /bin:/usr/bin:/sbin:/usr/sbin
+PATH= /bin:/usr/bin:/sbin:/usr/sbin
# now clobber the environment to just PATH and UT_TEST
-UT_TEST = unexport-env
+UT_TEST= unexport-env
# this removes everything
.unexport-env
Index: src/usr.bin/make/unit-tests/varshell.mk
diff -u src/usr.bin/make/unit-tests/varshell.mk:1.3 src/usr.bin/make/unit-tests/varshell.mk:1.4
--- src/usr.bin/make/unit-tests/varshell.mk:1.3 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/varshell.mk Sat Oct 24 08:50:17 2020
@@ -1,16 +1,16 @@
-# $NetBSD: varshell.mk,v 1.3 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: varshell.mk,v 1.4 2020/10/24 08:50:17 rillig Exp $
#
# Test VAR != shell command
-EXEC_FAILED != /bin/no/such/command
-TERMINATED_BY_SIGNAL != kill -14 $$$$
-ERROR_NO_OUTPUT != false
-ERROR_WITH_OUTPUT != echo "output before the error"; false
-NO_ERROR_NO_OUTPUT != true
-NO_ERROR_WITH_OUTPUT != echo "this is good"
+EXEC_FAILED!= /bin/no/such/command
+TERMINATED_BY_SIGNAL!= kill -14 $$$$
+ERROR_NO_OUTPUT!= false
+ERROR_WITH_OUTPUT!= echo "output before the error"; false
+NO_ERROR_NO_OUTPUT!= true
+NO_ERROR_WITH_OUTPUT!= echo "this is good"
-allvars= EXEC_FAILED TERMINATED_BY_SIGNAL ERROR_NO_OUTPUT ERROR_WITH_OUTPUT \
- NO_ERROR_NO_OUTPUT NO_ERROR_WITH_OUTPUT
+allvars= EXEC_FAILED TERMINATED_BY_SIGNAL ERROR_NO_OUTPUT ERROR_WITH_OUTPUT \
+ NO_ERROR_NO_OUTPUT NO_ERROR_WITH_OUTPUT
all:
.for v in ${allvars}
Index: src/usr.bin/make/unit-tests/export.mk
diff -u src/usr.bin/make/unit-tests/export.mk:1.9 src/usr.bin/make/unit-tests/export.mk:1.10
--- src/usr.bin/make/unit-tests/export.mk:1.9 Sat Oct 24 08:46:08 2020
+++ src/usr.bin/make/unit-tests/export.mk Sat Oct 24 08:50:17 2020
@@ -1,12 +1,12 @@
-# $NetBSD: export.mk,v 1.9 2020/10/24 08:46:08 rillig Exp $
+# $NetBSD: export.mk,v 1.10 2020/10/24 08:50:17 rillig Exp $
-UT_TEST=export
-UT_FOO=foo${BAR}
-UT_FU=fubar
-UT_ZOO=hoopie
-UT_NO=all
+UT_TEST= export
+UT_FOO= foo${BAR}
+UT_FU= fubar
+UT_ZOO= hoopie
+UT_NO= all
# believe it or not, we expect this one to come out with $UT_FU unexpanded.
-UT_DOLLAR= This is $$UT_FU
+UT_DOLLAR= This is $$UT_FU
.export UT_FU UT_FOO
.export UT_DOLLAR
@@ -36,9 +36,9 @@ ${:U!}= exclamation # A direct != would
# This is ignored because it is undefined.
.export UNDEFINED
-BAR=bar is ${UT_FU}
+BAR= bar is ${UT_FU}
-.MAKE.EXPORTED+= UT_ZOO UT_TEST
+.MAKE.EXPORTED+= UT_ZOO UT_TEST
FILTER_CMD?= egrep -v '^(MAKEFLAGS|MALLOC_OPTIONS|PATH|PWD|SHLVL|_|&)='
Index: src/usr.bin/make/unit-tests/moderrs.mk
diff -u src/usr.bin/make/unit-tests/moderrs.mk:1.16 src/usr.bin/make/unit-tests/moderrs.mk:1.17
--- src/usr.bin/make/unit-tests/moderrs.mk:1.16 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/moderrs.mk Sat Oct 24 08:50:17 2020
@@ -1,12 +1,12 @@
-# $NetBSD: moderrs.mk,v 1.16 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: moderrs.mk,v 1.17 2020/10/24 08:50:17 rillig Exp $
#
# various modifier error tests
-VAR=TheVariable
+VAR= TheVariable
# incase we have to change it ;-)
-MOD_UNKN=Z
-MOD_TERM=S,V,v
-MOD_S:= ${MOD_TERM},
+MOD_UNKN= Z
+MOD_TERM= S,V,v
+MOD_S:= ${MOD_TERM},
FIB= 1 1 2 3 5 8 13 21 34
Index: src/usr.bin/make/unit-tests/modmatch.mk
diff -u src/usr.bin/make/unit-tests/modmatch.mk:1.8 src/usr.bin/make/unit-tests/modmatch.mk:1.9
--- src/usr.bin/make/unit-tests/modmatch.mk:1.8 Sun Aug 16 20:03:53 2020
+++ src/usr.bin/make/unit-tests/modmatch.mk Sat Oct 24 08:50:17 2020
@@ -1,21 +1,21 @@
-# $NetBSD: modmatch.mk,v 1.8 2020/08/16 20:03:53 rillig Exp $
+# $NetBSD: modmatch.mk,v 1.9 2020/10/24 08:50:17 rillig Exp $
#
# Tests for the :M and :S modifiers.
-X=a b c d e
+X= a b c d e
.for x in $X
-LIB${x:tu}=/tmp/lib$x.a
+LIB${x:tu}= /tmp/lib$x.a
.endfor
-X_LIBS= ${LIBA} ${LIBD} ${LIBE}
+X_LIBS= ${LIBA} ${LIBD} ${LIBE}
-LIB?=a
+LIB?= a
-var = head
-res = no
+var= head
+res= no
.if !empty(var:M${:Uhead\:tail:C/:.*//})
-res = OK
+res= OK
.endif
all: show-libs
Index: src/usr.bin/make/unit-tests/modmisc.mk
diff -u src/usr.bin/make/unit-tests/modmisc.mk:1.48 src/usr.bin/make/unit-tests/modmisc.mk:1.49
--- src/usr.bin/make/unit-tests/modmisc.mk:1.48 Sat Oct 24 08:46:08 2020
+++ src/usr.bin/make/unit-tests/modmisc.mk Sat Oct 24 08:50:17 2020
@@ -1,19 +1,19 @@
-# $NetBSD: modmisc.mk,v 1.48 2020/10/24 08:46:08 rillig Exp $
+# $NetBSD: modmisc.mk,v 1.49 2020/10/24 08:50:17 rillig Exp $
#
# miscellaneous modifier tests
# do not put any dirs in this list which exist on some
# but not all target systems - an exists() check is below.
-path=:/bin:/tmp::/:.:/no/such/dir:.
+path= :/bin:/tmp::/:.:/no/such/dir:.
# strip cwd from path.
-MOD_NODOT=S/:/ /g:N.:ts:
-# and decorate, note that $'s need to be doubled. Also note that
+MOD_NODOT= S/:/ /g:N.:ts:
+# and decorate, note that $'s need to be doubled. Also note that
# the modifier_variable can be used with other modifiers.
-MOD_NODOTX=S/:/ /g:N.:@d@'$$d'@
+MOD_NODOTX= S/:/ /g:N.:@d@'$$d'@
# another mod - pretend it is more interesting
-MOD_HOMES=S,/home/,/homes/,
-MOD_OPT=@d@$${exists($$d):?$$d:$${d:S,/usr,/opt,}}@
-MOD_SEP=S,:, ,g
+MOD_HOMES= S,/home/,/homes/,
+MOD_OPT= @d@$${exists($$d):?$$d:$${d:S,/usr,/opt,}}@
+MOD_SEP= S,:, ,g
all: modvar modvarloop modsysv emptyvar undefvar
all: mod-quote
@@ -32,8 +32,8 @@ modvar:
@echo "path=${path:${MOD_HOMES}:${MOD_NODOTX}:ts:}"
.for d in ${path:${MOD_SEP}:N.} /usr/xbin
-path_$d?= ${d:${MOD_OPT}:${MOD_HOMES}}/
-paths+= ${d:${MOD_OPT}:${MOD_HOMES}}
+path_$d?= ${d:${MOD_OPT}:${MOD_HOMES}}/
+paths+= ${d:${MOD_OPT}:${MOD_HOMES}}
.endfor
modvarloop:
Index: src/usr.bin/make/unit-tests/modts.mk
diff -u src/usr.bin/make/unit-tests/modts.mk:1.6 src/usr.bin/make/unit-tests/modts.mk:1.7
--- src/usr.bin/make/unit-tests/modts.mk:1.6 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/modts.mk Sat Oct 24 08:50:17 2020
@@ -1,24 +1,24 @@
-# $NetBSD: modts.mk,v 1.6 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: modts.mk,v 1.7 2020/10/24 08:50:17 rillig Exp $
-LIST= one two three
-LIST+= four five six
+LIST= one two three
+LIST+= four five six
-FU_mod-ts = a / b / cool
+FU_mod-ts= a / b / cool
-AAA= a a a
-B.aaa= Baaa
+AAA= a a a
+B.aaa= Baaa
all: mod-ts mod-ts-space
# Use print or printf iff they are builtin.
-# XXX note that this causes problems, when make decides
+# XXX note that this causes problems, when make decides
# there is no need to use a shell, so avoid where possible.
.if ${type print 2> /dev/null || echo:L:sh:Mbuiltin} != ""
-PRINT= print -r --
+PRINT= print -r --
.elif ${type printf 2> /dev/null || echo:L:sh:Mbuiltin} != ""
-PRINT= printf '%s\n'
+PRINT= printf '%s\n'
.else
-PRINT= echo
+PRINT= echo
.endif
mod-ts:
Index: src/usr.bin/make/unit-tests/sysv.mk
diff -u src/usr.bin/make/unit-tests/sysv.mk:1.14 src/usr.bin/make/unit-tests/sysv.mk:1.15
--- src/usr.bin/make/unit-tests/sysv.mk:1.14 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/sysv.mk Sat Oct 24 08:50:17 2020
@@ -1,16 +1,16 @@
-# $NetBSD: sysv.mk,v 1.14 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: sysv.mk,v 1.15 2020/10/24 08:50:17 rillig Exp $
all: foo fun sam bla
-FOO ?=
-FOOBAR = ${FOO:=bar}
+FOO?=
+FOOBAR= ${FOO:=bar}
-_this := ${.PARSEDIR}/${.PARSEFILE}
+_this:= ${.PARSEDIR}/${.PARSEFILE}
-B = /b
-S = /
-FUN = ${B}${S}fun
-SUN = the Sun
+B= /b
+S= /
+FUN= ${B}${S}fun
+SUN= the Sun
# we expect nothing when FOO is empty
foo:
@@ -26,7 +26,7 @@ fun:
@echo ${In:L:%=% ${SUN}}
-SAM=sam.c
+SAM= sam.c
sam:
@echo ${SAM:s%.c=acme}
Index: src/usr.bin/make/unit-tests/varmisc.mk
diff -u src/usr.bin/make/unit-tests/varmisc.mk:1.25 src/usr.bin/make/unit-tests/varmisc.mk:1.26
--- src/usr.bin/make/unit-tests/varmisc.mk:1.25 Sat Oct 24 08:46:08 2020
+++ src/usr.bin/make/unit-tests/varmisc.mk Sat Oct 24 08:50:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: varmisc.mk,v 1.25 2020/10/24 08:46:08 rillig Exp $
+# $NetBSD: varmisc.mk,v 1.26 2020/10/24 08:50:17 rillig Exp $
#
# Miscellaneous variable tests.
@@ -12,10 +12,10 @@ all: varerror-unclosed
unmatched_var_paren:
@echo ${foo::=foo-text}
-True = ${echo true >&2:L:sh}TRUE
-False= ${echo false >&2:L:sh}FALSE
+True= ${echo true >&2:L:sh}TRUE
+False= ${echo false >&2:L:sh}FALSE
-VSET= is set
+VSET= is set
.undef UNDEF
U_false:
@@ -46,7 +46,7 @@ NQ_none:
@echo do not evaluate or expand :? if discarding
@echo ${VSET:U${1:L:?${True}:${False}}}
-April1= 1459494000
+April1= 1459494000
# slightly contorted syntax to use utc via variable
strftime:
@@ -54,11 +54,11 @@ strftime:
@echo date=${%Y%m%d:L:${gmtime=${April1}:L}}
# big jumps to handle 3 digits per step
-M_cmpv.units = 1 1000 1000000
-M_cmpv = S,., ,g:_:range:@i@+ $${_:[-$$i]} \* $${M_cmpv.units:[$$i]}@:S,^,expr 0 ,1:sh
+M_cmpv.units= 1 1000 1000000
+M_cmpv= S,., ,g:_:range:@i@+ $${_:[-$$i]} \* $${M_cmpv.units:[$$i]}@:S,^,expr 0 ,1:sh
-Version = 123.456.789
-cmpv.only = target specific vars
+Version= 123.456.789
+cmpv.only= target specific vars
cmpv:
@echo Version=${Version} == ${Version:${M_cmpv}}
@@ -67,10 +67,10 @@ cmpv:
# catch misshandling of nested vars in .for loop
MAN=
-MAN1= make.1
+MAN1= make.1
.for s in 1 2
. if defined(MAN$s) && !empty(MAN$s)
-MAN+= ${MAN$s}
+MAN+= ${MAN$s}
. endif
.endfor
@@ -199,8 +199,8 @@ UNCLOSED_INDIR_1= ${UNCLOSED_ORIG
UNCLOSED_INDIR_2= ${UNCLOSED_INDIR_1}
FLAGS= one two
-FLAGS+= ${FLAGS.${.ALLSRC:M*.c:T:u}}
-FLAGS.target2.c = three four
+FLAGS+= ${FLAGS.${.ALLSRC:M*.c:T:u}}
+FLAGS.target2.c= three four
target1.c:
target2.c: