Changeset View
Changeset View
Standalone View
Standalone View
share/mk/bsd.subdir.mk
| Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | |||||
| .endif | .endif | ||||
| .if defined(SUBDIR.) | .if defined(SUBDIR.) | ||||
| .error ${.CURDIR}: Found variable 'SUBDIR.' with value "${SUBDIR.}". This was\ | .error ${.CURDIR}: Found variable 'SUBDIR.' with value "${SUBDIR.}". This was\ | ||||
| probably caused by using SUBDIR.$${MK_FOO} without including\ | probably caused by using SUBDIR.$${MK_FOO} without including\ | ||||
| <src.opts.mk> or by using an invalid $${MK_FOO} option. | <src.opts.mk> or by using an invalid $${MK_FOO} option. | ||||
| .endif | .endif | ||||
| TIME_ENV ?= ${SRCTOP}/tools/build/time-buildworld.sh | |||||
| # Subdir code shared among 'make <subdir>', 'make <target>' and SUBDIR_PARALLEL. | # Subdir code shared among 'make <subdir>', 'make <target>' and SUBDIR_PARALLEL. | ||||
| _SUBDIR_SH= \ | _SUBDIR_SH= \ | ||||
| if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \ | if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \ | ||||
| dir=$${dir}.${MACHINE_ARCH}; \ | dir=$${dir}.${MACHINE_ARCH}; \ | ||||
| fi; \ | fi; \ | ||||
| ${ECHODIR} "===> ${DIRPRFX}$${dir} ($${target})"; \ | ${ECHODIR} "===> ${DIRPRFX}$${dir} ($${target})"; \ | ||||
| cd ${.CURDIR}/$${dir}; \ | cd ${.CURDIR}/$${dir}; \ | ||||
| ${MAKE} $${target} DIRPRFX=${DIRPRFX}$${dir}/ | _subdir=${.CURDIR:C/${SRCTOP}//}/$${dir}; \ | ||||
| TIME_MESSAGE="subdir $${target} $${_subdir\#/}" ${TIME_ENV} ${MAKE} $${target} DIRPRFX=${DIRPRFX}$${dir}/ | |||||
| # This is kept for compatibility only. The normal handling of attaching to | # This is kept for compatibility only. The normal handling of attaching to | ||||
| # SUBDIR_TARGETS will create a target for each directory. | # SUBDIR_TARGETS will create a target for each directory. | ||||
| _SUBDIR: .USEBEFORE | _SUBDIR: .USEBEFORE | ||||
| .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) | .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) | ||||
| @${_+_}target=${.TARGET:realinstall=install}; \ | @${_+_}target=${.TARGET:realinstall=install}; \ | ||||
| for dir in ${SUBDIR:N.WAIT}; do ( ${_SUBDIR_SH} ); done | for dir in ${SUBDIR:N.WAIT}; do ( ${_SUBDIR_SH} ); done | ||||
| .endif | .endif | ||||
| ▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines | |||||