pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Instead of directly manipulating DEPENDS...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2422505f2862
branches: trunk
changeset: 467000:2422505f2862
user: jlam <jlam%pkgsrc.org@localhost>
date: Sun Jan 25 13:26:43 2004 +0000
description:
Instead of directly manipulating DEPENDS, BUILD_DEPENDS, and RECOMMENDED,
create _BLNK_ADD_TO.<depmethod> for each of depencdency methods above from
the BUILDLINK_DEPEND.<pkg> and BUILDLINK_RECOMMENDED.<pkg> lists and save
the created values so they don't need to constantly be recomputed.
diffstat:
mk/buildlink3/bsd.buildlink3.mk | 62 +++++++++++++++++++++++-----------------
1 files changed, 36 insertions(+), 26 deletions(-)
diffs (86 lines):
diff -r e6aab5de6b1c -r 2422505f2862 mk/buildlink3/bsd.buildlink3.mk
--- a/mk/buildlink3/bsd.buildlink3.mk Sun Jan 25 13:09:46 2004 +0000
+++ b/mk/buildlink3/bsd.buildlink3.mk Sun Jan 25 13:26:43 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.56 2004/01/25 13:09:46 jlam Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.57 2004/01/25 13:26:43 jlam Exp $
#
# An example package buildlink3.mk file:
#
@@ -98,41 +98,51 @@
. endif
.endfor
-DEPENDS?= # empty
-BUILD_DEPENDS?= # empty
-
-.for _pkg_ in ${_BLNK_DEPENDS}
-#
# 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 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.
#
-. if !defined(BUILDLINK_DEPMETHOD.${_pkg_})
+.if !defined(_BLNK_ADD_TO.DEPENDS) || !defined(_BLNK_ADD_TO.BUILD_DEPENDS) || \
+ !defined(_BLNK_ADD_TO.RECOMMENDED)
+_BLNK_ADD_TO.DEPENDS= # empty
+_BLNK_ADD_TO.BUILD_DEPENDS= # empty
+_BLNK_ADD_TO.RECOMMENDED= # empty
+. for _pkg_ in ${_BLNK_DEPENDS}
+. if !defined(BUILDLINK_DEPMETHOD.${_pkg_})
BUILDLINK_DEPMETHOD.${_pkg_}= full
+. endif
+. if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
+_BLNK_DEPMETHOD.${_pkg_}= _BLNK_ADD_TO.DEPENDS
+_BLNK_RECMETHOD.${_pkg_}= _BLNK_ADD_TO.RECOMMENDED
+. elif !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mbuild)
+_BLNK_DEPMETHOD.${_pkg_}= _BLNK_ADD_TO.BUILD_DEPENDS
. endif
-. if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
-_BLNK_DEPMETHOD.${_pkg_}= DEPENDS
-_BLNK_RECMETHOD.${_pkg_}= RECOMMENDED
-. elif !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mbuild)
-_BLNK_DEPMETHOD.${_pkg_}= BUILD_DEPENDS
-. endif
-. if defined(BUILDLINK_DEPENDS.${_pkg_}) && \
+. if defined(BUILDLINK_DEPENDS.${_pkg_}) && \
defined(BUILDLINK_PKGSRCDIR.${_pkg_})
-. for _depend_ in ${BUILDLINK_DEPENDS.${_pkg_}}
-. if empty(${_BLNK_DEPMETHOD.${_pkg_}}:M${_depend_}\:*)
+. for _depend_ in ${BUILDLINK_DEPENDS.${_pkg_}}
+. if empty(${_BLNK_DEPMETHOD.${_pkg_}}:M${_depend_}\:*)
${_BLNK_DEPMETHOD.${_pkg_}}+= ${_depend_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
-. endif
-. endfor
-. endif
-. if defined(BUILDLINK_RECOMMENDED.${_pkg_}) && \
- defined(_BLNK_RECMETHOD.${_pkg_}) && \
- defined(BUILDLINK_PKGSRCDIR.${_pkg_})
-. for _rec_ in ${BUILDLINK_RECOMMENDED.${_pkg_}}
-${_BLNK_RECMETHOD.${_pkg_}}+= \
- ${_rec_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
-. endfor
+. endif
+. endfor
+. endif
+. if defined(BUILDLINK_RECOMMENDED.${_pkg_}) && \
+ defined(BUILDLINK_PKGSRCDIR.${_pkg_})
+. for _rec_ in ${BUILDLINK_RECOMMENDED.${_pkg_}}
+. if empty(${_BLNK_RECMETHOD.${_pkg_}}:M${_depend_}\:*)
+${_BLNK_RECMETHOD.${_pkg_}}+= ${_rec_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
+. endif
+. endfor
+. endif
+. endfor
+MAKEFLAGS+= _BLNK_ADD_TO.DEPENDS="${_BLNK_ADD_TO.DEPENDS}"
+MAKEFLAGS+= _BLNK_ADD_TO.BUILD_DEPENDS="${_BLNK_ADD_TO.BUILD_DEPENDS}"
+MAKEFLAGS+= _BLNK_ADD_TO.RECOMMENDED="${_BLNK_ADD_TO.RECOMMENDED}"
+.endif
+.for _depmethod_ in DEPENDS BUILD_DEPENDS RECOMMENDED
+. if !empty(_BLNK_ADD_TO.${_depmethod_})
+${_depmethod_}+= ${_BLNK_ADD_TO.${_depmethod_}}
. endif
.endfor
Home |
Main Index |
Thread Index |
Old Index