summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authortv <tv>2005-10-16 17:44:45 +0000
committertv <tv>2005-10-16 17:44:45 +0000
commit5ea022e303a3b94f5c87c43cdaaed36e5c5f1556 (patch)
tree54156729f434520b440f72cb575978376c0f8e4f /mk
parentd1691980e5b96b9f86cde371638af4001003e8c4 (diff)
downloadpkgsrc-5ea022e303a3b94f5c87c43cdaaed36e5c5f1556.tar.gz
Add "show-vars-eval" target, which outputs eval-able shell expressions
to allow easy setting of multiple variables in one invocation.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index ab50f3eb650..ce436586b02 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1730 2005/10/10 17:37:17 reed Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1731 2005/10/16 17:44:45 tv Exp $
#
# This file is in the public domain.
#
@@ -3907,6 +3907,14 @@ show-vars:
@${ECHO} ${${VARNAME}:Q}
.endfor
+# displays multiple variables as shell expressions
+# VARS is space separated list of VARNAME:shellvarname
+.PHONY: show-vars-eval
+show-vars-eval:
+.for var in ${VARS}
+ @${ECHO} ${var:C/^.*://}="${${var:C/:.*$//}:Q}"
+.endfor
+
.PHONY: print-build-depends-list
.if !target(print-build-depends-list)
print-build-depends-list: