pkgsrc-Changes archive

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

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   rillig
Date:           Wed Jul  1 07:39:52 UTC 2020

Modified Files:
        pkgsrc/mk/buildlink3: bsd.buildlink3.mk
        pkgsrc/mk/misc: show.mk
        pkgsrc/regress/show-all: spec

Log Message:
mk/buildlink3: increase width of varnames in show-all-bl3

The buildlink3 variable names are quite long.  So long that using the
default column width of 24 characters, most of the variable values are
not aligned.  In this case, it makes sense to shift them all to the right
a bit.


To generate a diff of this commit:
cvs rdiff -u -r1.244 -r1.245 pkgsrc/mk/buildlink3/bsd.buildlink3.mk
cvs rdiff -u -r1.20 -r1.21 pkgsrc/mk/misc/show.mk
cvs rdiff -u -r1.4 -r1.5 pkgsrc/regress/show-all/spec

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

Modified files:

Index: pkgsrc/mk/buildlink3/bsd.buildlink3.mk
diff -u pkgsrc/mk/buildlink3/bsd.buildlink3.mk:1.244 pkgsrc/mk/buildlink3/bsd.buildlink3.mk:1.245
--- pkgsrc/mk/buildlink3/bsd.buildlink3.mk:1.244        Sun Jun  7 17:56:13 2020
+++ pkgsrc/mk/buildlink3/bsd.buildlink3.mk      Wed Jul  1 07:39:52 2020
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.244 2020/06/07 17:56:13 rillig Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.245 2020/07/01 07:39:52 rillig Exp $
 #
 # Copyright (c) 2004 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -204,6 +204,7 @@ _BLNK_PACKAGES+=    ${_pkg_}
 .endfor
 
 _VARGROUPS+=           bl3
+_VARGROUPS_WIDTH.bl3=  39
 _DEF_VARS.bl3+=                _BLNK_PACKAGES _BLNK_DEPENDS
 _LISTED_VARS.bl3+=     _BLNK_PACKAGES _BLNK_DEPENDS
 .for v in BINDIR CFLAGS CPPFLAGS DEPENDS LDADD LDFLAGS LIBS

Index: pkgsrc/mk/misc/show.mk
diff -u pkgsrc/mk/misc/show.mk:1.20 pkgsrc/mk/misc/show.mk:1.21
--- pkgsrc/mk/misc/show.mk:1.20 Mon Mar 30 22:49:30 2020
+++ pkgsrc/mk/misc/show.mk      Wed Jul  1 07:39:52 2020
@@ -1,4 +1,4 @@
-# $NetBSD: show.mk,v 1.20 2020/03/30 22:49:30 rillig Exp $
+# $NetBSD: show.mk,v 1.21 2020/07/01 07:39:52 rillig Exp $
 #
 # This file contains some targets that print information gathered from
 # variables. They do not modify any variables.
@@ -154,6 +154,7 @@ _LABEL._DEF_VARS=   def
 
 show-all: .PHONY
 .for g in ${"${.TARGETS:Mshow-all*}":?${_VARGROUPS:O:u}:}
+.  for w in ${_VARGROUPS_WIDTH.${g}:U23}
 
 show-all: show-all-${g}
 
@@ -171,54 +172,55 @@ _SHOW_ALL.d8=     $$$$$$$$        # see regress/sho
 show-all-${g}: .PHONY
        @${RUN} printf '%s:\n' ${g:Q}
 
-.  for c in ${_SHOW_ALL_CATEGORIES}
-.    for v in ${${c}.${g}}
+.    for c in ${_SHOW_ALL_CATEGORIES}
+.      for v in ${${c}.${g}}
 
-.      if ${_SORTED_VARS.${g}:U:@pattern@ ${v:M${pattern}} @:M*}
+.        if ${_SORTED_VARS.${g}:U:@pattern@ ${v:M${pattern}} @:M*}
 
 # multi-valued variables, values are sorted
        ${RUN}                                                          \
        if ${!defined(${v}) :? true : false}; then                      \
-         printf '  %s\t%-23s # undefined\n' ${_LABEL.${c}} ${v:Q};     \
+         printf '  %-6s%-${w}s # undefined\n' ${_LABEL.${c}} ${v:Q};   \
        elif value=${${v}:U:M*:Q} && test "x$$value" = "x"; then        \
-         printf '  %s\t%-23s # empty\n' ${_LABEL.${c}} ${v:Q}=;        \
+         printf '  %-6s%-${w}s # empty\n' ${_LABEL.${c}} ${v:Q}=;      \
        else                                                            \
-         printf '  %s\t%-23s \\\n' ${_LABEL.${c}} ${v:Q}=;             \
-         printf '\t\t\t\t%s \\\n' ${${v}:O:C,\\$$,${_SHOW_ALL.d8},g:@x@${x:Q}@}; \
-         printf '\t\t\t\t# end of %s (sorted)\n' ${v:Q};               \
+         printf '  %-6s%-${w}s \\\n' ${_LABEL.${c}} ${v:Q}=;           \
+         printf '        %-${w}s %s \\\n' ${${v}:O:C,\\$$,${_SHOW_ALL.d8},g:@x@'' ${x:Q}@}; \
+         printf '        %-${w}s # end of %s (sorted)\n' '' ${v:Q};    \
        fi
 
-.      elif ${_LISTED_VARS.${g}:U:@pattern@ ${v:M${pattern}} @:M*}
+.        elif ${_LISTED_VARS.${g}:U:@pattern@ ${v:M${pattern}} @:M*}
 
 # multi-valued variables, preserving original order
        ${RUN}                                                          \
        if ${!defined(${v}) :? true : false}; then                      \
-         printf '  %s\t%-23s # undefined\n' ${_LABEL.${c}} ${v:Q};     \
+         printf '  %-6s%-${w}s # undefined\n' ${_LABEL.${c}} ${v:Q};   \
        elif value=${${v}:U:M*:Q} && test "x$$value" = "x"; then        \
-         printf '  %s\t%-23s # empty\n' ${_LABEL.${c}} ${v:Q}=;        \
+         printf '  %-6s%-${w}s # empty\n' ${_LABEL.${c}} ${v:Q}=;      \
        else                                                            \
-         printf '  %s\t%-23s \\\n' ${_LABEL.${c}} ${v:Q}=;             \
-         printf '\t\t\t\t%s \\\n' ${${v}:C,\\$$,${_SHOW_ALL.d8},g:@x@${x:Q}@}; \
-         printf '\t\t\t\t# end of %s\n' ${v:Q};                        \
+         printf '  %-6s%-${w}s \\\n' ${_LABEL.${c}} ${v:Q}=;           \
+         printf '        %-${w}s %s \\\n' ${${v}:C,\\$$,${_SHOW_ALL.d8},g:@x@'' ${x:Q}@}; \
+         printf '        %-${w}s # end of %s\n' '' ${v:Q};             \
        fi
 
-.      else
+.        else
 
 # single-valued variables
        ${RUN}                                                          \
        if ${!defined(${v}) :? true : false}; then                      \
-         printf '  %s\t%-23s # undefined\n' ${_LABEL.${c}} ${v:Q};     \
+         printf '  %-6s%-${w}s # undefined\n' ${_LABEL.${c}} ${v:Q};   \
        elif value=${${v}:U:C,\\$$,${_SHOW_ALL.d4},gW:Q} && test "x$$value" = "x"; then \
-         printf '  %s\t%-23s # empty\n' ${_LABEL.${c}} ${v:Q}=;        \
+         printf '  %-6s%-${w}s # empty\n' ${_LABEL.${c}} ${v:Q}=;      \
        else                                                            \
          case "$$value" in (*[\        \ ]) eol="# ends with space";; (*) eol=""; esac; \
-         printf '  %s\t%-23s %s\n' ${_LABEL.${c}} ${v:Q}= "$$value$$eol"; \
+         printf '  %-6s%-${w}s %s\n' ${_LABEL.${c}} ${v:Q}= "$$value$$eol"; \
        fi
 
-.      endif
+.        endif
+.      endfor
 .    endfor
-.  endfor
        ${RUN} printf '\n'
+.  endfor
 .endfor
 
 .PHONY: show-depends-options

Index: pkgsrc/regress/show-all/spec
diff -u pkgsrc/regress/show-all/spec:1.4 pkgsrc/regress/show-all/spec:1.5
--- pkgsrc/regress/show-all/spec:1.4    Fri Mar 20 16:39:03 2020
+++ pkgsrc/regress/show-all/spec        Wed Jul  1 07:39:52 2020
@@ -1,4 +1,4 @@
-# $NetBSD: spec,v 1.4 2020/03/20 16:39:03 rillig Exp $
+# $NetBSD: spec,v 1.5 2020/07/01 07:39:52 rillig Exp $
 
 tmpdir=${TMPDIR:-/tmp}/pkgsrc-show-all
 rm -rf "$tmpdir"
@@ -24,34 +24,34 @@ check_result() {
 
        cat <<'EOF' > "$tmpdir/expected"
 regress:
-  pkg  REGRESS_ENV.undefined   # undefined
-  pkg  REGRESS_ENV.empty=      # empty
-  pkg  REGRESS_ENV.space=      # empty
-  pkg  REGRESS_ENV.value=      \
-                               *=all \
-                               VAR1=value1 \
-                               VAR2=`command \
-                               backticks` \
-                               execution \
-                               via \
-                               # end of REGRESS_ENV.value (sorted)
-  pkg  REGRESS_ARGS.undefined  # undefined
-  pkg  REGRESS_ARGS.empty=     # empty
-  pkg  REGRESS_ARGS.space=     # empty
-  pkg  REGRESS_ARGS.value=     \
-                               VAR1=value1 \
-                               VAR2=`command \
-                               execution \
-                               via \
-                               backticks` \
-                               *=all \
-                               # end of REGRESS_ARGS.value
-  pkg  REGRESS.undefined       # undefined
-  pkg  REGRESS.empty=          # empty
-  pkg  REGRESS.space=           # ends with space
-  pkg  REGRESS.value=          All * kinds of `strange' \escape $$characters
-  pkg  *=                      show-all-regress
-  pkg  **=                     asterisk
+  pkg   REGRESS_ENV.undefined   # undefined
+  pkg   REGRESS_ENV.empty=      # empty
+  pkg   REGRESS_ENV.space=      # empty
+  pkg   REGRESS_ENV.value=      \
+                                *=all \
+                                VAR1=value1 \
+                                VAR2=`command \
+                                backticks` \
+                                execution \
+                                via \
+                                # end of REGRESS_ENV.value (sorted)
+  pkg   REGRESS_ARGS.undefined  # undefined
+  pkg   REGRESS_ARGS.empty=     # empty
+  pkg   REGRESS_ARGS.space=     # empty
+  pkg   REGRESS_ARGS.value=     \
+                                VAR1=value1 \
+                                VAR2=`command \
+                                execution \
+                                via \
+                                backticks` \
+                                *=all \
+                                # end of REGRESS_ARGS.value
+  pkg   REGRESS.undefined       # undefined
+  pkg   REGRESS.empty=          # empty
+  pkg   REGRESS.space=           # ends with space
+  pkg   REGRESS.value=          All * kinds of `strange' \escape $$characters
+  pkg   *=                      show-all-regress
+  pkg   **=                     asterisk
 
 EOF
 
@@ -76,13 +76,13 @@ EOF
        #
        cat <<'EOF' > "$tmpdir/expected"
 shellvar:
-  pkg  SHELLVAR_PLAIN=         "$$var $${var} $$other $$$$"
-  pkg  SHELLVAR_ENV=           \
-                               "$$var $${var} $$other $$$$" \
-                               # end of SHELLVAR_ENV (sorted)
-  pkg  SHELLVAR_ARGS=          \
-                               "$$var $${var} $$other $$$$" \
-                               # end of SHELLVAR_ARGS
+  pkg   SHELLVAR_PLAIN=         "$$var $${var} $$other $$$$"
+  pkg   SHELLVAR_ENV=           \
+                                "$$var $${var} $$other $$$$" \
+                                # end of SHELLVAR_ENV (sorted)
+  pkg   SHELLVAR_ARGS=          \
+                                "$$var $${var} $$other $$$$" \
+                                # end of SHELLVAR_ARGS
 
 EOF
 



Home | Main Index | Thread Index | Old Index