pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk/misc



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sat Sep 12 21:00:10 UTC 2020

Modified Files:
        pkgsrc/mk/misc: show.mk

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 pkgsrc/mk/misc/show.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/misc/show.mk
diff -u pkgsrc/mk/misc/show.mk:1.24 pkgsrc/mk/misc/show.mk:1.25
--- pkgsrc/mk/misc/show.mk:1.24 Sat Sep 12 20:48:13 2020
+++ pkgsrc/mk/misc/show.mk      Sat Sep 12 21:00:10 2020
@@ -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
 



Home | Main Index | Thread Index | Old Index