diff options
author | jlam <jlam@pkgsrc.org> | 2005-05-13 23:37:54 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-05-13 23:37:54 +0000 |
commit | f63cdfdd6c35969e7ad2ddf35f5f00cfd27419b8 (patch) | |
tree | 4b5e60465af6622b6a5f5e34bf3c4dcab599c540 /mk | |
parent | 78eb79df64d4ed63c58c5eab4aee5490d82eda42 (diff) | |
download | pkgsrc-f63cdfdd6c35969e7ad2ddf35f5f00cfd27419b8.tar.gz |
Rewrite command to compute the installation prefix of a package to not
use awk -- a simple shell statement list suffices.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/find-prefix.mk | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mk/find-prefix.mk b/mk/find-prefix.mk index 6990fcfe137..dfc47fd4afc 100644 --- a/mk/find-prefix.mk +++ b/mk/find-prefix.mk @@ -1,4 +1,4 @@ -# $NetBSD: find-prefix.mk,v 1.2 2005/05/12 21:56:11 jlam Exp $ +# $NetBSD: find-prefix.mk,v 1.3 2005/05/13 23:37:54 jlam Exp $ # # This is a "subroutine" that can be included to find the installation # prefix of a package. @@ -20,8 +20,11 @@ ${_def_:C/=.*$//}_DEFAULT?= ${LOCALBASE} _${_def_:C/=.*$//}_cmd= \ ${PKG_INFO} -qp ${_def_:C/^.*=//} 2>/dev/null | \ - ${AWK} '{ print $$2; exit }' | ${GREP} . || \ - ${ECHO} ${${_def_:C/=.*$//}_DEFAULT:Q} + { read cmd arg; \ + case "$$arg" in \ + "") ${ECHO} ${${_def_:C/=.*$//}_DEFAULT:Q} ;; \ + *) ${ECHO} "$$arg" ;; \ + esac; } ${_def_:C/=.*$//}= ${_${_def_:C/=.*$//}_cmd:sh} . endif MAKEVARS+= ${_def_:C/=.*$//} |