| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: build.mk,v 1.27 2019/09/02 02:54:57 rillig Exp $ | | 1 | # $NetBSD: build.mk,v 1.28 2019/09/02 02:59:47 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 |
| @@ -193,18 +193,19 @@ post-build: | | | @@ -193,18 +193,19 @@ post-build: |
193 | # User-settable variables: | | 193 | # User-settable variables: |
194 | # | | 194 | # |
195 | # BUILD_ENV_SHELL | | 195 | # BUILD_ENV_SHELL |
196 | # The shell to start. | | 196 | # The shell to start. |
197 | # | | 197 | # |
198 | # Default: ${SH} | | 198 | # Default: ${SH} |
199 | # | | 199 | # |
200 | # Keywords: debug build | | 200 | # Keywords: debug build |
201 | | | 201 | |
202 | BUILD_ENV_SHELL?= ${SH} | | 202 | BUILD_ENV_SHELL?= ${SH} |
203 | build-env: .PHONY ${_PKGSRC_BARRIER:Ubarrier:D_build-env} | | 203 | build-env: .PHONY ${_PKGSRC_BARRIER:Ubarrier:D_build-env} |
204 | _build-env: .PHONY configure | | 204 | _build-env: .PHONY configure |
205 | @${STEP_MSG} "Entering the build environment for ${PKGNAME}" | | 205 | @${STEP_MSG} "Entering the build environment for ${PKGNAME}" |
206 | .if ${BUILD_DIRS:[#]} > 1 | | 206 | .if ${BUILD_DIRS:[#]} > 1 || ${BUILD_DIRS} != ${WRKSRC} |
207 | @${ECHO_MSG} "The BUILD_DIRS are: "${BUILD_DIRS:Q} | | 207 | @${ECHO_MSG} "The BUILD_DIRS are:" \ |
| | | 208 | ${BUILD_DIRS:S,^${WRKSRC}$,.,:S,^${WRKSRC}/,,:Q} |
208 | .endif | | 209 | .endif |
209 | ${RUN}${_ULIMIT_CMD} \ | | 210 | ${RUN}${_ULIMIT_CMD} \ |
210 | cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${BUILD_ENV_SHELL} | | 211 | cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${BUILD_ENV_SHELL} |