diff options
author | joerg <joerg@pkgsrc.org> | 2007-05-22 21:27:59 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2007-05-22 21:27:59 +0000 |
commit | 6333a48d03995b3087c6f36800a4fdd62bcf0696 (patch) | |
tree | 498c316261fc00c2d751cc09a6303570166637b1 /mk | |
parent | fa80034a349f03fcd0d0adceaf487c10de5ed52d (diff) | |
download | pkgsrc-6333a48d03995b3087c6f36800a4fdd62bcf0696.tar.gz |
GNU make strongly dislikes it when MAKE is already set to bmake.
So ensure that we don't pollute the environment at all and push down
the arguments for install-dependencies via the command line.
Thanks to seb@ for the problem report and test.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/flavor/pkg/depends.mk | 26 | ||||
-rwxr-xr-x | mk/flavor/pkg/install-dependencies | 12 |
2 files changed, 15 insertions, 23 deletions
diff --git a/mk/flavor/pkg/depends.mk b/mk/flavor/pkg/depends.mk index e798948e820..ed75fb085ef 100644 --- a/mk/flavor/pkg/depends.mk +++ b/mk/flavor/pkg/depends.mk @@ -1,4 +1,4 @@ -# $NetBSD: depends.mk,v 1.29 2007/05/22 18:08:33 joerg Exp $ +# $NetBSD: depends.mk,v 1.30 2007/05/22 21:27:59 joerg Exp $ # This command prints out the dependency patterns for all full (run-time) # dependencies of the package. @@ -49,20 +49,12 @@ _RESOLVE_DEPENDS_CMD= \ " "${BUILD_DEPENDS:Q} \ " "${DEPENDS:Q} -_INSTALL_DEPENDS_CMD= \ - ${SETENV} _PKG_DBDIR=${_PKG_DBDIR:Q} \ - _PKGSRC_DEPS=${_PKSRC_DEPS:Q} \ - _DEPENDS_FILE=${_DEPENDS_FILE:Q} \ - DEPENDS_TARGET=${DEPENDS_TARGET:Q} \ - MAKE=${MAKE:Q} \ - MAKEFLAGS=${MAKEFLAGS:Q} \ - OBJECT_FMT=${OBJECT_FMT:Q} \ - PKG_ADMIN=${PKG_ADMIN_CMD:Q} \ - PKG_INFO=${PKG_INFO:Q} \ - _PKGNAME=${PKGNAME:Q} \ - PKGSRC_MAKE_ENV=${PKGSRC_MAKE_ENV:Q} \ - SETENV=${SETENV:Q} \ - ${SH} ${PKGSRCDIR}/mk/flavor/pkg/install-dependencies +_INSTALL_DEPENDS= ${PKGSRCDIR}/mk/flavor/pkg/install-dependencies +.for _var in _PKG_DBDIR _PKGSR_DEPS _DEPENDS_FILE DEPENDS_TARGET \ + MAKE MAKEFLAGS OBJECT_FMT PKG_ADMIN PKG_INFO PKGNAME \ + PKGSRC_MAKE_ENV SETENV +_INSTALL_DEPENDS_ARGS+= ${_var}=${${_var}:Q:Q} +.endfor ${_DEPENDS_FILE}: ${RUN} ${MKDIR} ${.TARGET:H} @@ -75,7 +67,7 @@ ${_RDEPENDS_FILE}: ${_DEPENDS_FILE} # Installs any missing dependencies. # _flavor-install-dependencies: .PHONY ${_DEPENDS_FILE} - ${RUN}${_INSTALL_DEPENDS_CMD} no-bootstrap + ${RUN}${SH} ${_INSTALL_DEPENDS} no-bootstrap ${_INSTALL_DEPENDS_ARGS} # _flavor-post-install-dependencies: # Targets after installing all dependencies. @@ -95,7 +87,7 @@ _BOOTSTRAP_DEPENDS_TARGETS+= ${_DEPENDS_FILE} _BOOTSTRAP_DEPENDS_TARGETS+= release-bootstrap-depends-lock bootstrap-depends: ${_BOOTSTRAP_DEPENDS_TARGETS} - ${RUN}${_INSTALL_DEPENDS_CMD} bootstrap + ${RUN}${SH} ${_INSTALL_DEPENDS} bootstrap ${_INSTALL_DEPENDS_ARGS} .PHONY: acquire-bootstrap-depends-lock: acquire-lock diff --git a/mk/flavor/pkg/install-dependencies b/mk/flavor/pkg/install-dependencies index 573e7c1113b..4d9323ecc7f 100755 --- a/mk/flavor/pkg/install-dependencies +++ b/mk/flavor/pkg/install-dependencies @@ -22,10 +22,10 @@ set -e -DEPENDS_FILE=${_DEPENDS_FILE} -unset _DEPENDS_FILE -PKGNAME=${_PKGNAME} -unset _PKGNAME +bootstrap_mode="$1" +shift + +eval "$@" error_msg() { ${ECHO} "ERROR:" "$*" 1>&2 @@ -39,8 +39,8 @@ find_best() { ${PKG_ADMIN} -b -d ${_PKG_DBDIR} -S lsbest $1 || ${TRUE} } -${CAT} ${DEPENDS_FILE} | while read type pattern dir; do - if $TEST "$1" = "bootstrap"; then +${CAT} ${_DEPENDS_FILE} | while read type pattern dir; do + if $TEST "$bootstrap_mode" = "bootstrap"; then $TEST "$type" != "bootstrap" && continue else $TEST "$type" = "bootstrap" && continue |