diff options
author | jlam <jlam@pkgsrc.org> | 2002-09-12 10:34:29 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-09-12 10:34:29 +0000 |
commit | b944dd3217cd3d1bb369f157527baba2df0fd647 (patch) | |
tree | 932ae1db08a27ca8fe96a588100ad27e42cec907 /mk | |
parent | 63f3771a9cde8d7d08341fde93d4873b69369940 (diff) | |
download | pkgsrc-b944dd3217cd3d1bb369f157527baba2df0fd647.tar.gz |
Add BUILD_DIRS and INSTALL_DIRS, which have the same semantics as
CONFIGURE_DIRS, and allows running the shell commands in the do-build and
do-install targets within the specified directories. Both variables
default to ${WRKSRC}.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index ed73c21b5f7..1e41013010f 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1044 2002/09/08 06:59:26 tron Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1045 2002/09/12 10:34:29 jlam Exp $ # # This file is in the public domain. # @@ -2071,16 +2071,24 @@ post-configure: ${_CONFIGURE_POSTREQ} # Build +BUILD_DIRS?= ${WRKSRC} + .if !target(do-build) do-build: - ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} ${ALL_TARGET} +. for DIR in ${BUILD_DIRS} + ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}cd ${DIR} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} ${ALL_TARGET} +. endfor .endif # Install +INSTALL_DIRS?= ${BUILD_DIRS} + .if !target(do-install) do-install: - ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} ${INSTALL_TARGET} +. for DIR in ${INSTALL_DIRS} + ${_PKG_SILENT}${_PKG_DEBUG}cd ${DIR} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} ${INSTALL_TARGET} +. endfor .endif # Package |