Ensure that _BLNK_DEPENDS is a subset of _BLNK_PACKAGES. Also rearrange
some code to more easily allow other having different dependency lists for different phases.
This commit is contained in:
parent
9c29d657e9
commit
9eac3f73f0
1 changed files with 53 additions and 48 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.buildlink3.mk,v 1.113 2004/03/12 18:03:53 jlam Exp $
|
||||
# $NetBSD: bsd.buildlink3.mk,v 1.114 2004/03/12 18:45:20 jlam Exp $
|
||||
#
|
||||
# An example package buildlink3.mk file:
|
||||
#
|
||||
|
@ -136,13 +136,14 @@ _BLNK_PACKAGES+= ${_pkg_}
|
|||
.endfor
|
||||
|
||||
# _BLNK_DEPENDS contains all of the elements of BUILDLINK_DEPENDS that
|
||||
# that shouldn't be skipped and that name packages for which we aren't
|
||||
# using the built-in software and hence need to add a dependency.
|
||||
# shouldn't be skipped and that name packages for which we aren't using
|
||||
# the built-in software and hence need to add a dependency.
|
||||
#
|
||||
_BLNK_DEPENDS= # empty
|
||||
.for _pkg_ in ${BUILDLINK_DEPENDS}
|
||||
USE_BUILTIN.${_pkg_}?= no
|
||||
. if empty(_BLNK_DEPENDS:M${_pkg_}) && !defined(IGNORE_PKG.${_pkg_}) && \
|
||||
!empty(_BLNK_PACKAGES:M${_pkg_}) && \
|
||||
!empty(USE_BUILTIN.${_pkg_}:M[nN][oO])
|
||||
_BLNK_DEPENDS+= ${_pkg_}
|
||||
. endif
|
||||
|
@ -153,21 +154,26 @@ _BLNK_DEPENDS+= ${_pkg_}
|
|||
BUILDLINK_DEPMETHOD.${_pkg_}?= full
|
||||
.endfor
|
||||
|
||||
# We skip the dependency calculation for some phases since they never
|
||||
# use the dependency information.
|
||||
#
|
||||
_BLNK_PHASES_SKIP_DEPENDS= fetch patch tools buildlink configure \
|
||||
build test
|
||||
.if !empty(_BLNK_PHASES_SKIP_DEPENDS:M${PKG_PHASE})
|
||||
_BLNK_DEPENDS_LIST= # empty
|
||||
.else
|
||||
_BLNK_DEPENDS_LIST= ${_BLNK_DEPENDS}
|
||||
.endif
|
||||
|
||||
# Add the proper dependency on each package pulled in by buildlink3.mk
|
||||
# files. BUILDLINK_DEPMETHOD.<pkg> contains a list of either "full" or
|
||||
# "build", and if any of that list is "full" then we use a full dependency
|
||||
# on <pkg>, otherwise we use a build dependency on <pkg>.
|
||||
#
|
||||
# We skip the dependency calculation for some phases since they never
|
||||
# use the dependency information.
|
||||
#
|
||||
_BLNK_PHASES_SKIP_DEPENDS= fetch patch tools buildlink configure build
|
||||
.if empty(_BLNK_PHASES_SKIP_DEPENDS:M${PKG_PHASE})
|
||||
_BLNK_ADD_TO.DEPENDS= # empty
|
||||
_BLNK_ADD_TO.BUILD_DEPENDS= # empty
|
||||
_BLNK_ADD_TO.RECOMMENDED= # empty
|
||||
. for _pkg_ in ${_BLNK_DEPENDS}
|
||||
BUILDLINK_DEPMETHOD.${_pkg_}?= full
|
||||
.for _pkg_ in ${_BLNK_DEPENDS_LIST}
|
||||
. if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
|
||||
_BLNK_DEPMETHOD.${_pkg_}= _BLNK_ADD_TO.DEPENDS
|
||||
_BLNK_RECMETHOD.${_pkg_}= _BLNK_ADD_TO.RECOMMENDED
|
||||
|
@ -243,13 +249,12 @@ ${_BLNK_RECMETHOD.${_pkg_}}+= ${_rec_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
|
|||
. endif
|
||||
. endfor
|
||||
. endif
|
||||
. endfor
|
||||
. for _depmethod_ in DEPENDS BUILD_DEPENDS RECOMMENDED
|
||||
.endfor
|
||||
.for _depmethod_ in DEPENDS BUILD_DEPENDS RECOMMENDED
|
||||
. if !empty(_BLNK_ADD_TO.${_depmethod_})
|
||||
${_depmethod_}+= ${_BLNK_ADD_TO.${_depmethod_}}
|
||||
. endif
|
||||
. endfor
|
||||
.endif
|
||||
.endfor # _BLNK_DEPENDS_LIST
|
||||
|
||||
.if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE})
|
||||
# Generate default values for:
|
||||
|
|
Loading…
Reference in a new issue