pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Rewrite command to compute the installation prefix ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c98b13ceee18
branches: trunk
changeset: 493744:c98b13ceee18
user: jlam <jlam%pkgsrc.org@localhost>
date: Fri May 13 23:37:54 2005 +0000
description:
Rewrite command to compute the installation prefix of a package to not
use awk -- a simple shell statement list suffices.
diffstat:
mk/find-prefix.mk | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (23 lines):
diff -r 4478496f6068 -r c98b13ceee18 mk/find-prefix.mk
--- a/mk/find-prefix.mk Fri May 13 23:28:08 2005 +0000
+++ b/mk/find-prefix.mk Fri May 13 23:37:54 2005 +0000
@@ -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/=.*$//}
Home |
Main Index |
Thread Index |
Old Index