diff options
author | rillig <rillig@pkgsrc.org> | 2020-02-09 20:33:38 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-02-09 20:33:38 +0000 |
commit | d175d6098dc72efc0e9f3f178642e80f509019f1 (patch) | |
tree | 162ba5374df1c5a8cd1b35dddd16b4cdaee44037 /mk/configure | |
parent | 018d714c6ba26fe87d782cbfea824f431bdd65ff (diff) | |
download | pkgsrc-d175d6098dc72efc0e9f3f178642e80f509019f1.tar.gz |
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 (limited to 'mk/configure')
-rw-r--r-- | mk/configure/configure.mk | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/mk/configure/configure.mk b/mk/configure/configure.mk index 3c773cec533..74ae47cef91 100644 --- a/mk/configure/configure.mk +++ b/mk/configure/configure.mk @@ -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 @@ configure-help: .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}} |