diff options
Diffstat (limited to 'mk/build')
-rw-r--r-- | mk/build/build.mk | 31 | ||||
-rw-r--r-- | mk/build/test.mk | 27 |
2 files changed, 48 insertions, 10 deletions
diff --git a/mk/build/build.mk b/mk/build/build.mk index c16acd23eec..bcc3225d704 100644 --- a/mk/build/build.mk +++ b/mk/build/build.mk @@ -1,14 +1,36 @@ -# $NetBSD: build.mk,v 1.7 2006/10/05 23:35:23 reed Exp $ +# $NetBSD: build.mk,v 1.8 2006/10/26 21:12:47 rillig Exp $ +# +# This file defines what happens in the build phase, excluding the +# self-test, which is defined in test.mk. +# +# Package-settable variables: # # BUILD_MAKE_FLAGS is the list of arguments that is passed to the make -# process. +# process, in addition to the usual MAKE_FLAGS. # # BUILD_TARGET is the target from ${MAKE_FILE} that should be invoked # to build the sources. # -BUILD_MAKE_FLAGS?= ${MAKE_FLAGS} +# Variables defined in this file: +# +# BUILD_MAKE_CMD +# This command sets the proper environment for the build phase +# and runs make(1) on it. It takes a list of make targets and +# flags as argument. +# +# See also: +# mk/build/test.mk +# + +BUILD_MAKE_FLAGS?= # none BUILD_TARGET?= all +BUILD_MAKE_CMD= \ + ${SETENV} ${MAKE_ENV} \ + ${MAKE_PROGRAM} ${_MAKE_JOBS} \ + ${MAKE_FLAGS} ${BUILD_MAKE_FLAGS} \ + -f ${MAKE_FILE} + .if defined(MAKE_JOBS_SAFE) && !empty(MAKE_JOBS_SAFE:M[nN][oO]) _MAKE_JOBS= # nothing .elif defined(MAKE_JOBS) @@ -102,8 +124,7 @@ do-build: . for _dir_ in ${BUILD_DIRS} ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD} \ cd ${WRKSRC} && cd ${_dir_} && \ - ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${_MAKE_JOBS} \ - ${BUILD_MAKE_FLAGS} -f ${MAKE_FILE} ${BUILD_TARGET} + ${BUILD_MAKE_CMD} ${BUILD_TARGET} . endfor .endif diff --git a/mk/build/test.mk b/mk/build/test.mk index b3667d31a24..9ddce04008e 100644 --- a/mk/build/test.mk +++ b/mk/build/test.mk @@ -1,4 +1,6 @@ -# $NetBSD: test.mk,v 1.7 2006/09/09 02:35:13 obache Exp $ +# $NetBSD: test.mk,v 1.8 2006/10/26 21:12:47 rillig Exp $ +# +# Package-settable variables: # # TEST_DIRS is the list of directories in which to perform the build # process. If the directories are relative paths, then they @@ -8,11 +10,27 @@ # process. # # TEST_MAKE_FLAGS is the list of arguments that is passed to the make -# process. +# process, in addition to the usual MAKE_FLAGS. +# +# Variables defined by this file: +# +# TEST_MAKE_CMD +# This command sets the proper environment for the test phase +# and runs make(1) on it. It takes a list of make targets and +# flags as argument. # +# See also: +# mk/build/build.mk +# + TEST_DIRS?= ${BUILD_DIRS} TEST_ENV+= ${MAKE_ENV} -TEST_MAKE_FLAGS?= ${MAKE_FLAGS} +TEST_MAKE_FLAGS?= # none + +TEST_MAKE_CMD= \ + ${SETENV} ${MAKE_ENV} \ + ${MAKE_PROGRAM} ${MAKE_FLAGS} ${TEST_MAKE_FLAGS} \ + -f ${MAKE_FILE} ###################################################################### ### test (PUBLIC) @@ -100,8 +118,7 @@ do-test: . for _dir_ in ${TEST_DIRS} ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD} \ cd ${WRKSRC} && cd ${_dir_} && \ - ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${TEST_MAKE_FLAGS} \ - -f ${MAKE_FILE} ${TEST_TARGET} + ${TEST_MAKE_CMD} ${TEST_TARGET} . endfor . else do-test: |