From owner-svn-src-all@freebsd.org Thu Nov 5 22:28:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31C0FA2682E; Thu, 5 Nov 2015 22:28:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9A291E5A; Thu, 5 Nov 2015 22:28:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5MSVkC054025; Thu, 5 Nov 2015 22:28:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5MSVCn054022; Thu, 5 Nov 2015 22:28:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511052228.tA5MSVCn054022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 5 Nov 2015 22:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290424 - in head: . share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 22:28:33 -0000 Author: bdrewery Date: Thu Nov 5 22:28:31 2015 New Revision: 290424 URL: https://svnweb.freebsd.org/changeset/base/290424 Log: Allow 'make buildenv' to work anywhere in the src tree. Sponsored by: EMC / Isilon Storage Division Added: head/share/mk/src.init.mk (contents, props changed) Modified: head/Makefile.inc1 head/share/mk/local.init.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Nov 5 22:09:00 2015 (r290423) +++ head/Makefile.inc1 Thu Nov 5 22:28:31 2015 (r290424) @@ -773,7 +773,7 @@ buildworld_epilogue: # modification of the current environment's PATH. In addition, we need # to quote multiword values. # -buildenvvars: +buildenvvars: .PHONY @echo ${WMAKEENV:Q} ${.MAKE.EXPORTED:@v@$v=\"${$v}\"@} .if ${.TARGETS:Mbuildenv} @@ -781,9 +781,11 @@ buildenvvars: .error The buildenv target is incompatible with -j .endif .endif -buildenv: +BUILDENV_DIR?= ${.CURDIR} +buildenv: .PHONY @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: ${TOOLCHAIN_TGTS} Modified: head/share/mk/local.init.mk ============================================================================== --- head/share/mk/local.init.mk Thu Nov 5 22:09:00 2015 (r290423) +++ head/share/mk/local.init.mk Thu Nov 5 22:28:31 2015 (r290424) @@ -38,3 +38,5 @@ CPP= ${HOST_CPP} HOST_CFLAGS+= -DHOSTPROG CFLAGS+= ${HOST_CFLAGS} .endif + +.-include "src.init.mk" Added: head/share/mk/src.init.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mk/src.init.mk Thu Nov 5 22:28:31 2015 (r290424) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +.if !target(____) +____: + +.if !target(buildenv) +buildenv: .PHONY + @env BUILDENV_DIR=${.CURDIR} ${MAKE} -C ${SRCTOP} buildenv +.endif + +.endif # !target(____)