From owner-svn-src-projects@FreeBSD.ORG Fri May 16 14:47:20 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2DD42F8; Fri, 16 May 2014 14:47:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 C424B26B7; Fri, 16 May 2014 14:47:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GElJPc078514; Fri, 16 May 2014 14:47:19 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GElJ0T078466; Fri, 16 May 2014 14:47:19 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201405161447.s4GElJ0T078466@svn.freebsd.org> From: "Simon J. Gerraty" Date: Fri, 16 May 2014 14:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r266224 - in projects/bmake: include share/mk X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 14:47:20 -0000 Author: sjg Date: Fri May 16 14:47:18 2014 New Revision: 266224 URL: http://svnweb.freebsd.org/changeset/base/266224 Log: We want to use stage_includes as a hook, so use NO_STAGE_INCLUDES in include/Makefile to suppress normal behavior Modified: projects/bmake/include/Makefile projects/bmake/share/mk/bsd.incs.mk projects/bmake/share/mk/meta.stage.mk Modified: projects/bmake/include/Makefile ============================================================================== --- projects/bmake/include/Makefile Fri May 16 14:43:24 2014 (r266223) +++ projects/bmake/include/Makefile Fri May 16 14:47:18 2014 (r266224) @@ -121,7 +121,7 @@ _MARCHS+= x86 .if ${MK_STAGING} != "no" # tell bsd.incs.mk that we have it covered -stage_includes: +NO_STAGE_INCLUDES= .endif .include @@ -371,3 +371,12 @@ symlinks: .if ${MK_META_MODE} == "yes" touch ${.TARGET} .endif + +.if ${MACHINE} == "host" +# we're here because we are building a sysroot... +# we need MACHINE et al set correctly +HOST_MACHINE!= uname -m +HOST_MACHINE_ARCH!= uname -p +MACHINE:= ${HOST_MACHINE} +MACHINE_ARCH:= ${HOST_MACHINE_ARCH} +.endif Modified: projects/bmake/share/mk/bsd.incs.mk ============================================================================== --- projects/bmake/share/mk/bsd.incs.mk Fri May 16 14:43:24 2014 (r266223) +++ projects/bmake/share/mk/bsd.incs.mk Fri May 16 14:47:18 2014 (r266224) @@ -45,6 +45,7 @@ ${group}NAME_${header:T}?= ${header:T} STAGE_AS_SETS+= ${group} STAGE_AS_${header:T}= ${${group}NAME_${header:T}} stage_as.${group}: ${header} +stage_includes: stage_as.${group} installincludes: _${group}INS_${header:T} _${group}INS_${header:T}: ${header} @@ -58,6 +59,7 @@ _${group}INCS+= ${header} .endfor .if !empty(_${group}INCS) stage_files.${group}: ${_${group}INCS} +stage_includes: stage_files.${group} installincludes: _${group}INS _${group}INS: ${_${group}INCS} @@ -91,13 +93,8 @@ realinstall: installincludes .ORDER: beforeinstall installincludes .if ${MK_STAGING} != "no" && !defined(_SKIP_BUILD) -.if !target(stage_includes) -.if !empty(STAGE_SETS) -buildincludes: stage_files -.if !empty(STAGE_AS_SETS) -buildincludes: stage_as -.endif -.endif +.if !defined(NO_STAGE_INCLUDES) +staging: stage_includes .if !empty(INCSLINKS) staging: stage_symlinks STAGE_SYMLINKS.INCS= ${INCSLINKS} Modified: projects/bmake/share/mk/meta.stage.mk ============================================================================== --- projects/bmake/share/mk/meta.stage.mk Fri May 16 14:43:24 2014 (r266223) +++ projects/bmake/share/mk/meta.stage.mk Fri May 16 14:47:18 2014 (r266224) @@ -123,6 +123,7 @@ _STAGE_BASENAME_USE: .USE ${.TARGET:T} STAGE_TARGETS += stage_incs STAGE_INCS ?= ${.ALLSRC:N.dirdep} +stage_includes: stage_incs stage_incs: .dirdep @${STAGE_FILE_SCRIPT}; StageFiles ${STAGE_INCSDIR:${STAGE_DIR_FILTER}} ${STAGE_INCS} @touch $@ @@ -220,7 +221,7 @@ stage_as.$s: .dirdep .endfor .endif -CLEANFILES += ${STAGE_TARGETS} +CLEANFILES += ${STAGE_TARGETS} stage_incs stage_includes # stage_*links usually needs to follow any others. .for t in ${STAGE_TARGETS:N*links:O:u}