From 817366f1c154a6985ab541c6f58d81b12066b0ef Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 20 Jun 2017 22:08:02 +0000 Subject: [PATCH] buildworld: Pass which world phase the build is in down to submakes. This is useful for having directories behave differently depending on the phase - such as enabling SUBDIR_PARALLEL or disabling redundant building of library directories already done by earlier 'make _libraries'. Sponsored by: Dell EMC Isilon --- Makefile.inc1 | 6 +++++- targets/pseudo/bootstrap-tools/Makefile | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 242e76b24e18..c456d96d5beb 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -518,6 +518,7 @@ BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ # need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile BSARGS= DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ + BWPHASE=${.TARGET:C,^_,,} \ SSP_CFLAGS= \ MK_HTML=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ @@ -536,6 +537,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ + BWPHASE=${.TARGET:C,^_,,} \ SSP_CFLAGS= \ -DNO_LINT \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ @@ -689,7 +691,9 @@ NO_META_IGNORE_HOST_HEADERS= 1 host-osreldate.h: # DO NOT ADD /usr/include/osreldate.h here @cp -f /usr/include/osreldate.h ${.TARGET} -WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 DESTDIR=${WORLDTMP} +WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ + BWPHASE=${.TARGET:C,^_,,} \ + DESTDIR=${WORLDTMP} IMAKEENV= ${CROSSENV} IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 \ diff --git a/targets/pseudo/bootstrap-tools/Makefile b/targets/pseudo/bootstrap-tools/Makefile index 2259861ce24e..9b0f524f0c63 100644 --- a/targets/pseudo/bootstrap-tools/Makefile +++ b/targets/pseudo/bootstrap-tools/Makefile @@ -35,6 +35,7 @@ OSRELDATE?= 0 # need to keep this in sync with src/Makefile.inc1 BSARGS= DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ + BWPHASE=${.TARGET} \ SSP_CFLAGS= \ MK_HTML=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \