summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.debug.mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-07-20 17:31:20 +0000
committerrillig <rillig@pkgsrc.org>2006-07-20 17:31:20 +0000
commit394ccb3cb8944712695bef8e627955a56831947a (patch)
tree3a4ba9303cb4e743f2e44697c33a64d997fb9f2f /mk/bsd.pkg.debug.mk
parent3454ff7f3791ddb412c832bab72854a62f474506 (diff)
downloadpkgsrc-394ccb3cb8944712695bef8e627955a56831947a.tar.gz
Added the build-env target.
Diffstat (limited to 'mk/bsd.pkg.debug.mk')
-rw-r--r--mk/bsd.pkg.debug.mk22
1 files changed, 18 insertions, 4 deletions
diff --git a/mk/bsd.pkg.debug.mk b/mk/bsd.pkg.debug.mk
index 235bee263e1..2a1b3f75622 100644
--- a/mk/bsd.pkg.debug.mk
+++ b/mk/bsd.pkg.debug.mk
@@ -1,9 +1,13 @@
-# $NetBSD: bsd.pkg.debug.mk,v 1.2 2006/07/20 17:14:26 rillig Exp $
+# $NetBSD: bsd.pkg.debug.mk,v 1.3 2006/07/20 17:31:20 rillig Exp $
#
-# This file provides the `debug' target, which outputs the values of
-# some commonly used variables and the contents of some files which are
-# useful for tracking bugs.
+# The `debug' target outputs the values of some commonly used variables
+# and the contents of some files which are useful for tracking bugs,
+# especially for packages that use the GNU autotools.
+#
+# The `build-env' target is intended to be used interactively when
+# debugging build problems. It runs a shell in exactly the same
+# environment as in the default do-build target, starting in WRKSRC.
PRINTF?= printf
@@ -117,3 +121,13 @@ _show-dbginfo-install:
_show-dbginfo-plist-subst:
@${PRINTF} "PLIST_SUBST (sorted alphabetically):\\n"
@${PRINTF} "\\t%s\\n" ${PLIST_SUBST:O}
+
+#
+# The build-env target.
+#
+
+.PHONY: build-env
+build-env: configure
+ @${STEP_MSG} "Entering the build environment for ${PKGNAME}"
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SH}