pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk mk/configure: add configure-env target
details: https://anonhg.NetBSD.org/pkgsrc/rev/27ca20ebddec
branches: trunk
changeset: 411308:27ca20ebddec
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun Feb 09 20:33:38 2020 +0000
description:
mk/configure: add configure-env target
This allows easy inspection of the realistic environment in which the
configure scripts are run.
The code is copied from the similar build-env target.
This might help to find the cause for pkg/54894, where "gcc -dumpversion"
is said to output 0 as the version number.
diffstat:
mk/bsd.pkg.barrier.mk | 4 ++--
mk/configure/configure.mk | 29 ++++++++++++++++++++++++++++-
2 files changed, 30 insertions(+), 3 deletions(-)
diffs (58 lines):
diff -r 8ab809636df7 -r 27ca20ebddec mk/bsd.pkg.barrier.mk
--- a/mk/bsd.pkg.barrier.mk Sun Feb 09 20:02:45 2020 +0000
+++ b/mk/bsd.pkg.barrier.mk Sun Feb 09 20:33:38 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.barrier.mk,v 1.19 2013/05/23 13:18:56 obache Exp $
+# $NetBSD: bsd.pkg.barrier.mk,v 1.20 2020/02/09 20:33:38 rillig Exp $
_COOKIE.barrier= ${WRKDIR}/.barrier_cookie
@@ -18,7 +18,7 @@
_BARRIER_POST_TARGETS+= wrapper
_BARRIER_POST_TARGETS+= extract
_BARRIER_POST_TARGETS+= patch
-_BARRIER_POST_TARGETS+= configure
+_BARRIER_POST_TARGETS+= configure configure-env
_BARRIER_POST_TARGETS+= build build-env
_BARRIER_POST_TARGETS+= test
_BARRIER_POST_TARGETS+= all
diff -r 8ab809636df7 -r 27ca20ebddec mk/configure/configure.mk
--- a/mk/configure/configure.mk Sun Feb 09 20:02:45 2020 +0000
+++ b/mk/configure/configure.mk Sun Feb 09 20:33:38 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: configure.mk,v 1.29 2019/05/07 19:36:44 rillig Exp $
+# $NetBSD: configure.mk,v 1.30 2020/02/09 20:33:39 rillig Exp $
#
# = Package-settable variables =
#
@@ -288,3 +288,30 @@
.for d in ${CONFIGURE_DIRS}
${RUN} cd ${WRKSRC} && cd ${d} && ${PKGSRC_SETENV} ${_CONFIGURE_SCRIPT_ENV} ${CONFIG_SHELL} ${CONFIGURE_SCRIPT} --help
.endfor
+
+# configure-env:
+# Runs an interactive shell in the same environment that is
+# also used for the configure scripts.
+#
+# This is only used during development and testing of a package
+# to work in the same environment as the actual build.
+#
+# User-settable variables:
+#
+# CONFIGURE_ENV_SHELL
+# The shell to start.
+#
+# Default: ${CONFIG_SHELL}
+#
+# Keywords: debug configure
+
+configure-env: .PHONY ${_PKGSRC_BARRIER:Ubarrier:D_configure-env}
+_configure-env: .PHONY wrapper
+ @${STEP_MSG} "Entering the configure environment for ${PKGNAME}"
+.if ${CONFIGURE_DIRS:[#]} > 1 || ${CONFIGURE_DIRS} != ${WRKSRC}
+ @${ECHO_MSG} "The CONFIGURE_DIRS are:" \
+ ${CONFIGURE_DIRS:S,^${WRKSRC}$,.,:S,^${WRKSRC}/,,:Q}
+.endif
+ ${RUN} cd ${WRKSRC} && cd ${d} \
+ && ${PKGSRC_SETENV} ${_CONFIGURE_SCRIPT_ENV} \
+ ${CONFIGURE_ENV_SHELL:U${CONFIG_SHELL}}
Home |
Main Index |
Thread Index |
Old Index