diff options
author | agc <agc> | 2000-07-15 20:39:13 +0000 |
---|---|---|
committer | agc <agc> | 2000-07-15 20:39:13 +0000 |
commit | 99e9734c1322552385b4029f09f3dc349f4a2510 (patch) | |
tree | 16d493248b3dac046feba96b3b2a8fb8abcc8be3 /mk | |
parent | 52fb06f2eeb47f6a33f713dd9a58a5743c6b314f (diff) | |
download | pkgsrc-99e9734c1322552385b4029f09f3dc349f4a2510.tar.gz |
Instead of the clunky SHOW_PKG_PREFIX, introduce an EVAL_PREFIX definition,
which takes entries of the format <make-definition-name>=<pkgname>. This
has not been added to MAKEFLAGS because (a) premature optimisation is the
root of all evil, and (b) because the .for loop used to implement this
shows the wrong results when multiple prefices are evaluated.
Modify all the package Makefiles to use EVAL_PREFIX, thereby simplifying
them considerably.
ALso simplify the logic to calculate the prefix as well.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index b2adc8f3d27..809f0eb7969 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.505 2000/07/14 18:37:05 tron Exp $ +# $NetBSD: bsd.pkg.mk,v 1.506 2000/07/15 20:39:21 agc Exp $ # # This file is in the public domain. # @@ -1182,8 +1182,13 @@ show-downlevel: .endif .endif -SHOW_PREFIX1= ${PKG_INFO} -qp -SHOW_PREFIX2= 2>/dev/null | ${AWK} 'BEGIN { p="${X11PREFIX}" } { p = $$2 } END { printf("%s\n", p) }' +.if defined(EVAL_PREFIX) +.for def in ${EVAL_PREFIX} +.if !defined(${def:C/=.*//}) +${def:C/=.*//} != (${ECHO} -n "${X11PREFIX} "; ${PKG_INFO} -qp ${def:C/.*=//} 2>/dev/null) | ${AWK} '{ print $$NF }' +.endif +.endfor +.endif .if !target(show-pkgsrc-dir) show-pkgsrc-dir: |