--- bsd.port.mk.orig 2012-01-16 17:34:21.000000000 -0500 +++ bsd.port.mk 2012-01-23 14:50:27.000000000 -0500 @@ -4329,18 +4329,18 @@ .if ${UID} != 0 && defined(_${target:U}_SUSEQ) && !defined(INSTALL_AS_USER) .if defined(USE_SUBMAKE) ${${target:U}_COOKIE}: ${_${target:U}_DEP} - @cd ${.CURDIR} && ${MAKE} ${_${target:U}_SEQ} + @cd ${.CURDIR} && ${SETENV} ${MAKE_ENV} ${MAKE} ${_${target:U}_SEQ} .else ${${target:U}_COOKIE}: ${_${target:U}_DEP} ${_${target:U}_SEQ} .endif @${ECHO_MSG} "===> Switching to root credentials for '${target}' target" @cd ${.CURDIR} && \ - ${SU_CMD} "${MAKE} ${_${target:U}_SUSEQ}" + ${SU_CMD} "${SETENV} ${MAKE_ENV} ${MAKE} ${_${target:U}_SUSEQ}" @${ECHO_MSG} "===> Returning to user credentials" @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} .elif defined(USE_SUBMAKE) ${${target:U}_COOKIE}: ${_${target:U}_DEP} - @cd ${.CURDIR} && \ + @cd ${.CURDIR} && ${SETENV} ${MAKE_ENV} \ ${MAKE} ${_${target:U}_SEQ} ${_${target:U}_SUSEQ} @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} .else @@ -4353,7 +4353,7 @@ @if [ -e ${.TARGET} ]; then \ ${DO_NADA}; \ else \ - cd ${.CURDIR} && ${MAKE} ${.TARGET}; \ + cd ${.CURDIR} && ${SETENV} ${MAKE_ENV} ${MAKE} ${.TARGET}; \ fi .endif @@ -5263,14 +5263,14 @@ fetch-recursive: @${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies" @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ - (cd $$dir; ${MAKE} fetch); \ + (cd $$dir; ${SETENV} ${MAKE_ENV} ${MAKE} fetch); \ done .endif .if !target(fetch-recursive-list) fetch-recursive-list: @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ - (cd $$dir; ${MAKE} fetch-list); \ + (cd $$dir; ${SETENV} ${MAKE_ENV} ${MAKE} fetch-list); \ done .endif @@ -5333,7 +5333,7 @@ checksum-recursive: @${ECHO_MSG} "===> Fetching and checking checksums for ${PKGNAME} and dependencies" @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ - (cd $$dir; ${MAKE} checksum); \ + (cd $$dir; ${SETENV} ${MAKE_ENV} ${MAKE} checksum); \ done .endif @@ -5458,7 +5458,7 @@ package-recursive: package @for dir in $$(${ALL-DEPENDS-LIST}); do \ - (cd $$dir; ${MAKE} package-noinstall); \ + (cd $$dir; ${SETENV} ${MAKE_ENV} ${MAKE} package-noinstall); \ done # Show missing dependencies @@ -6008,7 +6008,7 @@ config-recursive: @${ECHO_MSG} "===> Setting user-specified options for ${PKGNAME} and dependencies"; @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ - (cd $$dir; ${MAKE} config-conditional); \ + (cd $$dir; ${SETENV} ${MAKE_ENV} ${MAKE} config-conditional); \ done .endif @@ -6037,10 +6037,10 @@ shift 3; \ done; \ if [ "$${OPTIONS_INVALID}" = "yes" ]; then \ - cd ${.CURDIR} && ${MAKE} config; \ + cd ${.CURDIR} && ${SETENV} ${MAKE_ENV} ${MAKE} config; \ fi; .else - cd ${.CURDIR} && ${MAKE} config; + cd ${.CURDIR} && ${SETENV} ${MAKE_ENV} ${MAKE} config; .endif .endif .endif @@ -6077,7 +6077,7 @@ showconfig-recursive: @${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME} and dependencies"; @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ - (cd $$dir; ${MAKE} showconfig); \ + (cd $$dir; ${SETENV} ${MAKE_ENV} ${MAKE} showconfig); \ done .endif @@ -6104,7 +6104,7 @@ rmconfig-recursive: @${ECHO_MSG} "===> Removing user-specified options for ${PKGNAME} and dependencies"; @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ - (cd $$dir; ${MAKE} rmconfig); \ + (cd $$dir; ${SETENV} ${MAKE_ENV} ${MAKE} rmconfig); \ done .endif