Allow 'make buildenv' to work anywhere in the src tree.
Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
+5
-3
@@ -773,7 +773,7 @@ buildworld_epilogue:
|
|||||||
# modification of the current environment's PATH. In addition, we need
|
# modification of the current environment's PATH. In addition, we need
|
||||||
# to quote multiword values.
|
# to quote multiword values.
|
||||||
#
|
#
|
||||||
buildenvvars:
|
buildenvvars: .PHONY
|
||||||
@echo ${WMAKEENV:Q} ${.MAKE.EXPORTED:@v@$v=\"${$v}\"@}
|
@echo ${WMAKEENV:Q} ${.MAKE.EXPORTED:@v@$v=\"${$v}\"@}
|
||||||
|
|
||||||
.if ${.TARGETS:Mbuildenv}
|
.if ${.TARGETS:Mbuildenv}
|
||||||
@@ -781,9 +781,11 @@ buildenvvars:
|
|||||||
.error The buildenv target is incompatible with -j
|
.error The buildenv target is incompatible with -j
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
buildenv:
|
BUILDENV_DIR?= ${.CURDIR}
|
||||||
|
buildenv: .PHONY
|
||||||
@echo Entering world for ${TARGET_ARCH}:${TARGET}
|
@echo Entering world for ${TARGET_ARCH}:${TARGET}
|
||||||
@cd ${.CURDIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} || true
|
@cd ${BUILDENV_DIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} \
|
||||||
|
|| true
|
||||||
|
|
||||||
TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32}
|
TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32}
|
||||||
toolchain: ${TOOLCHAIN_TGTS}
|
toolchain: ${TOOLCHAIN_TGTS}
|
||||||
|
|||||||
@@ -38,3 +38,5 @@ CPP= ${HOST_CPP}
|
|||||||
HOST_CFLAGS+= -DHOSTPROG
|
HOST_CFLAGS+= -DHOSTPROG
|
||||||
CFLAGS+= ${HOST_CFLAGS}
|
CFLAGS+= ${HOST_CFLAGS}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.-include "src.init.mk"
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
.if !target(__<src.init.mk>__)
|
||||||
|
__<src.init.mk>__:
|
||||||
|
|
||||||
|
.if !target(buildenv)
|
||||||
|
buildenv: .PHONY
|
||||||
|
@env BUILDENV_DIR=${.CURDIR} ${MAKE} -C ${SRCTOP} buildenv
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.endif # !target(__<src.init.mk>__)
|
||||||
Reference in New Issue
Block a user