diff options
author | jlam <jlam@pkgsrc.org> | 2003-09-10 02:16:42 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2003-09-10 02:16:42 +0000 |
commit | 0f8e73262161bcd32cd08db1a144f006a0f4d1e2 (patch) | |
tree | 0b160a67fc038a3a5269d1059f8add0284631eaf /mk | |
parent | e02a907cbef5f44cebcd89f07e99705467eabce5 (diff) | |
download | pkgsrc-0f8e73262161bcd32cd08db1a144f006a0f4d1e2.tar.gz |
Check that ${_PKG_DBDIR} exists before cd'ing into it. This makes
building using buildlink3 on systems that have never seen pkgsrc before
work properly.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index 65a71782745..c227fe67407 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.8 2003/09/09 09:15:03 jlam Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.9 2003/09/10 02:16:42 jlam Exp $ # # An example package buildlink3.mk file: # @@ -137,7 +137,10 @@ ${_BLNK_DEPMETHOD.${_pkg_}}+= \ .for _pkg_ in ${BUILDLINK_PACKAGES} ${_BLNK_X11_LINKS_PACKAGE} . if !defined(_BLNK_PKG_DBDIR.${_pkg_}) _BLNK_PKG_DBDIR.${_pkg_}!= \ - dir=`cd ${_PKG_DBDIR}; ${PKG_ADMIN} -s "" lsbest "${BUILDLINK_DEPENDS.${_pkg_}}" || ${TRUE}`; \ + dir=""; \ + if [ -d ${_PKG_DBDIR} ]; then \ + dir=`cd ${_PKG_DBDIR}; ${PKG_ADMIN} -s "" lsbest "${BUILDLINK_DEPENDS.${_pkg_}}" || ${TRUE}`; \ + fi; \ case "$$dir" in \ "") dir="not_found" ;; \ *) if [ -f $$dir/+DEPOT ]; then \ |