summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-07-25 07:36:40 +0000
committerjlam <jlam@pkgsrc.org>2001-07-25 07:36:40 +0000
commit9d08dcf9296fcd4c2cfdad0a56c62923b72c841a (patch)
treed79eaf7cae1f27c96a791d8081cc6a7a2970eef8 /mk
parent94e384e17fdf9080b153c86fd04b57f0611b11a8 (diff)
downloadpkgsrc-9d08dcf9296fcd4c2cfdad0a56c62923b72c841a.tar.gz
Change the EVAL_PREFIX logic so that if
EVAL_PREFIX= FOODIR=foo is defined, then FOODIR's value is only saved if the package foo was found. This causes FOODIR to keep being reset until the package foo is installed, which makes EVAL_PREFIX work properly with buildlink.mk files. This should fix various problems people have been having with files not being linked in when a dependency is built via a "make build" in a package that uses that dependency further up the chain.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 09f32716902..214c92af40c 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.789 2001/07/18 22:43:32 hubertf Exp $
+# $NetBSD: bsd.pkg.mk,v 1.790 2001/07/25 07:36:40 jlam Exp $
#
# This file is in the public domain.
#
@@ -1343,9 +1343,14 @@ show-downlevel:
${def:C/=.*//}_DEFAULT= ${X11PREFIX}
. endif
. if !defined(${def:C/=.*//})
-_dir_${def:C/=.*//} != (${PKG_INFO} -qp ${def:C/.*=//} 2>/dev/null; ${ECHO} " @cwd ${${def:C/=.*//}_DEFAULT}") | ${AWK} '{ print $$2; exit }'
+_depend_${def:C/=.*//} != ${PKG_INFO} -e ${def:C/.*=//} 2>/dev/null; ${ECHO}
+. if (${_depend_${def:C/=.*//}} == "")
+${def:C/=.*//}=${${def:C/=.*//}_DEFAULT}
+. else
+_dir_${def:C/=.*//} != (${PKG_INFO} -qp ${def:C/.*=//} 2>/dev/null) | ${AWK} '{ print $$2; exit }'
${def:C/=.*//}=${_dir_${def:C/=.*//}}
MAKEFLAGS+= ${def:C/=.*//}=${_dir_${def:C/=.*//}}
+. endif
. endif
. endfor
.endif