summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2002-09-27 12:21:41 +0000
committerjlam <jlam>2002-09-27 12:21:41 +0000
commit59b57feb4db822cdf5fb516e9af7770850f6b153 (patch)
treedc810284fd34f67576962861c4b3bc3cb3bc7f65 /mk
parent37e58d73a3a344ab27ad2b656059b2b3728ce460 (diff)
downloadpkgsrc-59b57feb4db822cdf5fb516e9af7770850f6b153.tar.gz
Provide a way for buildlink2.mk files to convert a build dependency to
a full dependency. BUILDLINK_DEPMETHOD.<pkg> is now a space-separated list of the words "full" and/or "build", and if any of them is "full", then a full dependency on <pkg> is used. buildlink2.mk files may now do: BUILDLINK_DEPMETHOD.<pkg>+= full to convert from a build to a full dependency. Previously, if a package Makefile set BUILDLINK_DEPMETHOD.<pkg>=build, there was no way to override its value consistently.
Diffstat (limited to 'mk')
-rw-r--r--mk/buildlink2/bsd.buildlink2.mk11
1 files changed, 6 insertions, 5 deletions
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk
index 8bb76ac28b3..7d45cfda830 100644
--- a/mk/buildlink2/bsd.buildlink2.mk
+++ b/mk/buildlink2/bsd.buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink2.mk,v 1.33 2002/09/27 09:22:59 jlam Exp $
+# $NetBSD: bsd.buildlink2.mk,v 1.34 2002/09/27 12:21:41 jlam Exp $
#
# An example package buildlink2.mk file:
#
@@ -72,17 +72,18 @@ LDFLAGS:= ${_BLNK_LDFLAGS} ${LDFLAGS}
PATH:= ${BUILDLINK_DIR}/bin:${PATH}
# Add the proper dependency on each package pulled in by buildlink2.mk
-# files. BUILDLINK_DEPMETHOD.<pkg> is either "full" or "build" to represent
-# either a full dependency or a build dependency on <pkg>. By default,
+# files. BUILDLINK_DEPMETHOD.<pkg> contains a list of either "full" or
+# "build", and if any of that list if "full" then we use a full dependency
+# on <pkg>, otherwise we use a build dependency on <pkg>. By default,
# we use a full dependency.
#
.for _pkg_ in ${BUILDLINK_PACKAGES}
. if !defined(BUILDLINK_DEPMETHOD.${_pkg_})
BUILDLINK_DEPMETHOD.${_pkg_}= full
. endif
-. if (${BUILDLINK_DEPMETHOD.${_pkg_}} == "full")
+. if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
_BUILDLINK_DEPMETHOD.${_pkg_}= DEPENDS
-. elif (${BUILDLINK_DEPMETHOD.${_pkg_}} == "build")
+. elif !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mbuild)
_BUILDLINK_DEPMETHOD.${_pkg_}= BUILD_DEPENDS
. endif
. if defined(BUILDLINK_DEPENDS.${_pkg_}) && \