diff options
author | joerg <joerg@pkgsrc.org> | 2007-03-14 16:23:48 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2007-03-14 16:23:48 +0000 |
commit | 83a29f686f3fbcb6ee2933df0d896612c4cc29ba (patch) | |
tree | bddb73a835fcb65060b3d6a22733520455303419 /mk | |
parent | 465f1dfaed238039724dfe2ac442bd26a537c853 (diff) | |
download | pkgsrc-83a29f686f3fbcb6ee2933df0d896612c4cc29ba.tar.gz |
Use the new -T option of pkg_crate, if pkg_install is new enough.
This means that all build dependencies are recorded in the package as
well, making it much easier to decide whether a dependency changed the
package should be rebuild in a bulk build.
This would have also been useful for users wanting to switch to modular
Xorg to decide what used x11-links.
OK agc@
Diffstat (limited to 'mk')
-rw-r--r-- | mk/flavor/pkg/depends.mk | 6 | ||||
-rw-r--r-- | mk/flavor/pkg/metadata.mk | 12 |
2 files changed, 16 insertions, 2 deletions
diff --git a/mk/flavor/pkg/depends.mk b/mk/flavor/pkg/depends.mk index bcf9ca99c4b..0d9df539280 100644 --- a/mk/flavor/pkg/depends.mk +++ b/mk/flavor/pkg/depends.mk @@ -1,4 +1,4 @@ -# $NetBSD: depends.mk,v 1.22 2007/03/09 00:39:55 rillig Exp $ +# $NetBSD: depends.mk,v 1.23 2007/03/14 16:23:48 joerg Exp $ _DEPENDS_FILE= ${WRKDIR}/.depends _REDUCE_DEPENDS_CMD= ${SETENV} CAT=${CAT:Q} \ @@ -15,6 +15,10 @@ _DEPENDS_PATTERNS_CMD= \ [ ! -f ${_COOKIE.depends} ] \ || ${AWK} '$$1 == "full" { print $$2; }' < ${_COOKIE.depends} +_BUILD_DEPENDS_PATTERNS_CMD= \ + [ ! -f ${_COOKIE.depends} ] \ + || ${AWK} '$$1 == "build" { print $$2; }' < ${_COOKIE.depends} + .PHONY: show-depends show-depends: @case ${VARNAME:Q}"" in \ diff --git a/mk/flavor/pkg/metadata.mk b/mk/flavor/pkg/metadata.mk index ff04c0ab216..bf69f691824 100644 --- a/mk/flavor/pkg/metadata.mk +++ b/mk/flavor/pkg/metadata.mk @@ -1,4 +1,4 @@ -# $NetBSD: metadata.mk,v 1.16 2007/03/09 04:07:50 rillig Exp $ +# $NetBSD: metadata.mk,v 1.17 2007/03/14 16:23:48 joerg Exp $ ###################################################################### ### The targets below are all PRIVATE. @@ -332,6 +332,9 @@ _PKG_CREATE_ARGS+= -S ${_SIZE_ALL_FILE} _PKG_CREATE_ARGS+= -s ${_SIZE_PKG_FILE} _PKG_CREATE_ARGS+= ${CONFLICTS:D -C ${CONFLICTS:Q}} _PKG_CREATE_ARGS+= ${_DEPENDS_ARG_cmd:sh} +.if ${PKGTOOLS_VERSION} >= 20070308 +_PKG_CREATE_ARGS+= ${_BUILD_DEPENDS_ARG_cmd:sh} +.endif _PKG_CREATE_ARGS+= ${INSTALL_FILE:D ${_INSTALL_ARG_cmd:sh}} _PKG_CREATE_ARGS+= ${DEINSTALL_FILE:D ${_DEINSTALL_ARG_cmd:sh}} @@ -349,6 +352,13 @@ _DEPENDS_ARG_cmd= depends=`${_DEPENDS_PATTERNS_CMD}`; \ ${ECHO}; \ fi +_BUILD_DEPENDS_ARG_cmd= depends=`${_BUILD_DEPENDS_PATTERNS_CMD}`; \ + if ${TEST} -n "$$depends"; then \ + ${ECHO} "-T \"$$depends\""; \ + else \ + ${ECHO}; \ + fi + _DEINSTALL_ARG_cmd= if ${TEST} -f ${DEINSTALL_FILE}; then \ ${ECHO} "-k "${DEINSTALL_FILE:Q}; \ else \ |