| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: build.mk,v 1.33 2020/04/25 21:36:17 rillig Exp $ | | 1 | # $NetBSD: build.mk,v 1.34 2020/06/12 17:33:23 rillig Exp $ |
2 | # | | 2 | # |
3 | # This file defines what happens in the build phase, excluding the | | 3 | # This file defines what happens in the build phase, excluding the |
4 | # self-test, which is defined in test.mk. | | 4 | # self-test, which is defined in test.mk. |
5 | # | | 5 | # |
6 | # Public targets for developers: | | 6 | # Public targets for developers: |
7 | # | | 7 | # |
8 | # build-env: | | 8 | # build-env: |
9 | # Runs an interactive shell (BUILD_ENV_SHELL) in the environment | | 9 | # Runs an interactive shell (BUILD_ENV_SHELL) in the environment |
10 | # that is used for building the package. | | 10 | # that is used for building the package. |
11 | # | | 11 | # |
12 | # Package-settable variables: | | 12 | # Package-settable variables: |
13 | # | | 13 | # |
14 | # BUILD_MAKE_FLAGS is the list of arguments that is passed to the make | | 14 | # BUILD_MAKE_FLAGS is the list of arguments that is passed to the make |
| @@ -192,27 +192,27 @@ post-build: | | | @@ -192,27 +192,27 @@ post-build: |
192 | | | 192 | |
193 | # build-env: | | 193 | # build-env: |
194 | # Starts an interactive shell in WRKSRC. | | 194 | # Starts an interactive shell in WRKSRC. |
195 | # | | 195 | # |
196 | # This is only used during development and testing of a package | | 196 | # This is only used during development and testing of a package |
197 | # to work in the environment (MAKE_ENV) that is used by default | | 197 | # to work in the environment (MAKE_ENV) that is used by default |
198 | # for building the packages. | | 198 | # for building the packages. |
199 | # | | 199 | # |
200 | # User-settable variables: | | 200 | # User-settable variables: |
201 | # | | 201 | # |
202 | # BUILD_ENV_SHELL | | 202 | # BUILD_ENV_SHELL |
203 | # The shell to start. | | 203 | # The shell to start. |
204 | # | | 204 | # |
205 | # Default: ${SHELL}, fallback ${SH} | | 205 | # Default: ${SH}, to realistically match the build environment. |
206 | # | | 206 | # |
207 | # Keywords: debug build | | 207 | # Keywords: debug build |
208 | | | 208 | |
209 | BUILD_ENV_SHELL?= ${SHELL:U${SH}} | | 209 | BUILD_ENV_SHELL?= ${SH} |
210 | build-env: .PHONY ${_PKGSRC_BARRIER:Ubarrier:D_build-env} | | 210 | build-env: .PHONY ${_PKGSRC_BARRIER:Ubarrier:D_build-env} |
211 | _build-env: .PHONY configure | | 211 | _build-env: .PHONY configure |
212 | @${STEP_MSG} "Entering the build environment for ${PKGNAME}" | | 212 | @${STEP_MSG} "Entering the build environment for ${PKGNAME}" |
213 | .if ${BUILD_DIRS:[#]} > 1 || ${BUILD_DIRS} != ${WRKSRC} | | 213 | .if ${BUILD_DIRS:[#]} > 1 || ${BUILD_DIRS} != ${WRKSRC} |
214 | @${ECHO_MSG} "The BUILD_DIRS are:" \ | | 214 | @${ECHO_MSG} "The BUILD_DIRS are:" \ |
215 | ${BUILD_DIRS:S,^${WRKSRC}$,.,:S,^${WRKSRC}/,,:Q} | | 215 | ${BUILD_DIRS:S,^${WRKSRC}$,.,:S,^${WRKSRC}/,,:Q} |
216 | .endif | | 216 | .endif |
217 | ${RUN}${_ULIMIT_CMD} \ | | 217 | ${RUN}${_ULIMIT_CMD} \ |
218 | cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${BUILD_ENV_SHELL} | | 218 | cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${BUILD_ENV_SHELL} |