summaryrefslogtreecommitdiff
path: root/mk/build
diff options
context:
space:
mode:
authorrillig <rillig>2007-03-08 23:16:06 +0000
committerrillig <rillig>2007-03-08 23:16:06 +0000
commitf07f1f9cea10e25f21e5a66db24abd23c3dcf91d (patch)
tree574b8e84f8382f6a1e1e4a0bbd5b81674fff94ef /mk/build
parenta532eb462011d807b442f25abe61e77300849b95 (diff)
downloadpkgsrc-f07f1f9cea10e25f21e5a66db24abd23c3dcf91d.tar.gz
Moved the build-env target from bsd.pkg.debug.mk to build/build.mk. It
is no longer available to packages that set NO_BUILD. Added the variable BUILD_ENV_SHELL, since I prefer a comfortable shell over /bin/sh for interactive work.
Diffstat (limited to 'mk/build')
-rw-r--r--mk/build/build.mk14
1 files changed, 13 insertions, 1 deletions
diff --git a/mk/build/build.mk b/mk/build/build.mk
index 79e9e6f96b2..1cf0a06ad57 100644
--- a/mk/build/build.mk
+++ b/mk/build/build.mk
@@ -1,8 +1,14 @@
-# $NetBSD: build.mk,v 1.9 2006/11/09 02:53:15 rillig Exp $
+# $NetBSD: build.mk,v 1.10 2007/03/08 23:16:06 rillig Exp $
#
# This file defines what happens in the build phase, excluding the
# self-test, which is defined in test.mk.
#
+# Public targets for developers:
+#
+# build-env:
+# Runs an interactive shell (BUILD_ENV_SHELL) in the environment
+# that is used for building the package.
+#
# Package-settable variables:
#
# BUILD_MAKE_FLAGS is the list of arguments that is passed to the make
@@ -138,3 +144,9 @@ pre-build:
post-build:
@${DO_NADA}
.endif
+
+BUILD_ENV_SHELL?= ${SH}
+build-env: .PHONY configure
+ @${STEP_MSG} "Entering the build environment for ${PKGNAME}"
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${BUILD_ENV_SHELL}