Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make/unit-tests make(1): use consistent indentation ...
details: https://anonhg.NetBSD.org/src/rev/3519419ad1ad
branches: trunk
changeset: 977442:3519419ad1ad
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Oct 24 08:50:17 2020 +0000
description:
make(1): use consistent indentation in variable assignments
Initial work by "pkglint -F *.mk", manually adjusted in a few places.
diffstat:
usr.bin/make/unit-tests/cond-short.mk | 44 +++++-----
usr.bin/make/unit-tests/directive-for.mk | 6 +-
usr.bin/make/unit-tests/dotwait.mk | 8 +-
usr.bin/make/unit-tests/escape.mk | 90 ++++++++++++------------
usr.bin/make/unit-tests/export-all.mk | 18 ++--
usr.bin/make/unit-tests/export-env.mk | 10 +-
usr.bin/make/unit-tests/export.mk | 18 ++--
usr.bin/make/unit-tests/forloop.mk | 24 +++---
usr.bin/make/unit-tests/job-output-long-lines.mk | 4 +-
usr.bin/make/unit-tests/moderrs.mk | 10 +-
usr.bin/make/unit-tests/modmatch.mk | 16 ++--
usr.bin/make/unit-tests/modmisc.mk | 20 ++--
usr.bin/make/unit-tests/modts.mk | 20 ++--
usr.bin/make/unit-tests/modword.mk | 26 +++---
usr.bin/make/unit-tests/opt-debug-lint.mk | 4 +-
usr.bin/make/unit-tests/posix1.mk | 16 ++--
usr.bin/make/unit-tests/qequals.mk | 8 +-
usr.bin/make/unit-tests/recursive.mk | 20 ++--
usr.bin/make/unit-tests/sunshcmd.mk | 8 +-
usr.bin/make/unit-tests/sysv.mk | 18 ++--
usr.bin/make/unit-tests/unexport-env.mk | 6 +-
usr.bin/make/unit-tests/unexport.mk | 4 +-
usr.bin/make/unit-tests/var-op-append.mk | 4 +-
usr.bin/make/unit-tests/var-op-assign.mk | 4 +-
usr.bin/make/unit-tests/varcmd.mk | 20 ++--
usr.bin/make/unit-tests/varmisc.mk | 26 +++---
usr.bin/make/unit-tests/varname-dot-parsedir.mk | 4 +-
usr.bin/make/unit-tests/varname-dot-parsefile.mk | 4 +-
usr.bin/make/unit-tests/varshell.mk | 18 ++--
29 files changed, 239 insertions(+), 239 deletions(-)
diffs (truncated from 1084 to 300 lines):
diff -r 311957b0bd8d -r 3519419ad1ad usr.bin/make/unit-tests/cond-short.mk
--- a/usr.bin/make/unit-tests/cond-short.mk Sat Oct 24 08:46:08 2020 +0000
+++ b/usr.bin/make/unit-tests/cond-short.mk Sat Oct 24 08:50:17 2020 +0000
@@ -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 @@
# 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:
@:;:
diff -r 311957b0bd8d -r 3519419ad1ad usr.bin/make/unit-tests/directive-for.mk
--- a/usr.bin/make/unit-tests/directive-for.mk Sat Oct 24 08:46:08 2020 +0000
+++ b/usr.bin/make/unit-tests/directive-for.mk Sat Oct 24 08:50:17 2020 +0000
@@ -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 @@
# 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
diff -r 311957b0bd8d -r 3519419ad1ad usr.bin/make/unit-tests/dotwait.mk
--- a/usr.bin/make/unit-tests/dotwait.mk Sat Oct 24 08:46:08 2020 +0000
+++ b/usr.bin/make/unit-tests/dotwait.mk Sat Oct 24 08:50:17 2020 +0000
@@ -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
diff -r 311957b0bd8d -r 3519419ad1ad usr.bin/make/unit-tests/escape.mk
--- a/usr.bin/make/unit-tests/escape.mk Sat Oct 24 08:46:08 2020 +0000
+++ b/usr.bin/make/unit-tests/escape.mk Sat Oct 24 08:50:17 2020 +0000
@@ -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 @@
# 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 @@
# 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 @@
# 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 @@
# 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 @@
# 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 @@
# 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 @@
# 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
diff -r 311957b0bd8d -r 3519419ad1ad usr.bin/make/unit-tests/export-all.mk
--- a/usr.bin/make/unit-tests/export-all.mk Sat Oct 24 08:46:08 2020 +0000
Home |
Main Index |
Thread Index |
Old Index