diff options
author | rillig <rillig@pkgsrc.org> | 2020-09-12 21:00:10 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-09-12 21:00:10 +0000 |
commit | 662b6fbeaea9565c67abea95dd15f865c72dec5d (patch) | |
tree | 1eb69eb7894769328ef983e3e7d3262f709865a4 /mk | |
parent | 5ecf5a796dc6cd457f6be92dcdb300e2802624e1 (diff) | |
download | pkgsrc-662b6fbeaea9565c67abea95dd15f865c72dec5d.tar.gz |
show-all: use separator for long rows of backslashes
I had been confused by the printf commands since some of them used '\n'
and some used '\\\n', which seemed as if there were some quoting issue
that would make it necessary to double the backslashes.
This assumption was wrong though. The printf commands for the
single-valued variables use the normal '\n', while the lines for the
multi-valued variables end with a real backslash in the output, to
mimick the continuation lines in makefiles.
As a hint that the '\\\n' means backslash + newline, add single quotes
between the two characters.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/misc/show.mk | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mk/misc/show.mk b/mk/misc/show.mk index c2563f2aef5..cfc93ad85c2 100644 --- a/mk/misc/show.mk +++ b/mk/misc/show.mk @@ -1,4 +1,4 @@ -# $NetBSD: show.mk,v 1.24 2020/09/12 20:48:13 rillig Exp $ +# $NetBSD: show.mk,v 1.25 2020/09/12 21:00:10 rillig Exp $ # # This file contains some targets that print information gathered from # variables. They do not modify any variables. @@ -181,8 +181,8 @@ show-all-${g}: .PHONY elif value=${${v}:U:M*:Q} && test "x$$value" = "x"; then \ printf ' %-6s%-${w}s # empty\n' ${_LABEL.${c}} ${v:Q}=; \ else \ - printf ' %-6s%-${w}s \\\n' ${_LABEL.${c}} ${v:Q}=; \ - printf ' %-${w}s %s \\\n' ${${v}:O:C,\\\$,\$\$\$\$,g:@x@'' ${x:Q}@}; \ + printf ' %-6s%-${w}s \\''\n' ${_LABEL.${c}} ${v:Q}=; \ + printf ' %-${w}s %s \\''\n' ${${v}:O:C,\\\$,\$\$\$\$,g:@x@'' ${x:Q}@}; \ printf ' %-${w}s # end of %s (sorted)\n' '' ${v:Q}; \ fi @@ -195,8 +195,8 @@ show-all-${g}: .PHONY elif value=${${v}:U:M*:Q} && test "x$$value" = "x"; then \ printf ' %-6s%-${w}s # empty\n' ${_LABEL.${c}} ${v:Q}=; \ else \ - printf ' %-6s%-${w}s \\\n' ${_LABEL.${c}} ${v:Q}=; \ - printf ' %-${w}s %s \\\n' ${${v}:C,\\\$,\$\$\$\$,g:@x@'' ${x:Q}@}; \ + printf ' %-6s%-${w}s \\''\n' ${_LABEL.${c}} ${v:Q}=; \ + printf ' %-${w}s %s \\''\n' ${${v}:C,\\\$,\$\$\$\$,g:@x@'' ${x:Q}@}; \ printf ' %-${w}s # end of %s\n' '' ${v:Q}; \ fi |