Follow-up r318105: Don't use NO_OBJ at top-level, use NO_OBJWALK.

NO_OBJ has a very specific meaning in sub-directories in that no object
directory will be made.  If a user wanted to skip the 'make obj' phase then
passing -DNO_OBJ would break all sub-directories from building properly.  Using
NO_OBJ internally also causes issue with NO_OBJ handling being added in
share/mk/bsd.init.mk soon.

Sponsored by:	Dell EMC Isilon
This commit is contained in:
Bryan Drewery 2017-11-03 23:22:03 +00:00
parent 1883caa7cc
commit 2abeba9d7a
3 changed files with 21 additions and 21 deletions

View File

@ -301,7 +301,7 @@ CLEANDIR= cleandir
.if defined(WORLDFAST) .if defined(WORLDFAST)
NO_CLEAN= t NO_CLEAN= t
NO_OBJ= t NO_OBJWALK= t
.endif .endif
.if ${MK_META_MODE} == "yes" .if ${MK_META_MODE} == "yes"
@ -312,11 +312,11 @@ NO_OBJ= t
NO_CLEAN= t NO_CLEAN= t
.endif .endif
.endif .endif
.if defined(NO_OBJ) || ${MK_AUTO_OBJ} == "yes" .if defined(NO_OBJWALK) || ${MK_AUTO_OBJ} == "yes"
NO_OBJ= t NO_OBJWALK= t
NO_KERNELOBJ= t NO_KERNELOBJ= t
.endif .endif
.if !defined(NO_OBJ) .if !defined(NO_OBJWALK)
_obj= obj _obj= obj
.endif .endif
@ -942,7 +942,7 @@ WMAKE_TGTS+= _sanity_check _worldtmp _legacy
WMAKE_TGTS+= _bootstrap-tools WMAKE_TGTS+= _bootstrap-tools
.endif .endif
WMAKE_TGTS+= _cleanobj WMAKE_TGTS+= _cleanobj
.if !defined(NO_OBJ) .if !defined(NO_OBJWALK)
WMAKE_TGTS+= _obj WMAKE_TGTS+= _obj
.endif .endif
WMAKE_TGTS+= _build-tools _cross-tools WMAKE_TGTS+= _build-tools _cross-tools
@ -1804,7 +1804,7 @@ legacy: .PHONY
.for _tool in tools/build ${_elftoolchain_libs} .for _tool in tools/build ${_elftoolchain_libs}
${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \ ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \
cd ${.CURDIR}/${_tool}; \ cd ${.CURDIR}/${_tool}; \
if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP}/legacy includes; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP}/legacy includes; \
${MAKE} DIRPRFX=${_tool}/ MK_INCLUDES=no all; \ ${MAKE} DIRPRFX=${_tool}/ MK_INCLUDES=no all; \
${MAKE} DIRPRFX=${_tool}/ MK_INCLUDES=no \ ${MAKE} DIRPRFX=${_tool}/ MK_INCLUDES=no \
@ -1950,7 +1950,7 @@ bootstrap-tools: .PHONY
${_bt}-${_tool}: .PHONY .MAKE ${_bt}-${_tool}: .PHONY .MAKE
${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
cd ${.CURDIR}/${_tool}; \ cd ${.CURDIR}/${_tool}; \
if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ all; \
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP}/legacy install ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP}/legacy install
@ -2001,7 +2001,7 @@ build-tools_${_tool}: .PHONY
${_+_}@${ECHODIR} "===> ${_tool} (${_bt_clean:D${_bt_clean},}obj,build-tools)"; \ ${_+_}@${ECHODIR} "===> ${_tool} (${_bt_clean:D${_bt_clean},}obj,build-tools)"; \
cd ${.CURDIR}/${_tool}; \ cd ${.CURDIR}/${_tool}; \
if [ -n "${_bt_clean}" ]; then ${MAKE} DIRPRFX=${_tool}/ ${_bt_clean}; fi; \ if [ -n "${_bt_clean}" ]; then ${MAKE} DIRPRFX=${_tool}/ ${_bt_clean}; fi; \
if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
${MAKE} DIRPRFX=${_tool}/ build-tools ${MAKE} DIRPRFX=${_tool}/ build-tools
build-tools: build-tools_${_tool} build-tools: build-tools_${_tool}
.endfor .endfor
@ -2086,7 +2086,7 @@ cross-tools: .MAKE .PHONY
${_usb_tools} ${_usb_tools}
${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
cd ${.CURDIR}/${_tool}; \ cd ${.CURDIR}/${_tool}; \
if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ all; \
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP} install ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP} install
.endfor .endfor
@ -2227,7 +2227,7 @@ native-xtools: .PHONY
# needed build tools are built. # needed build tools are built.
${_+_}cd ${.CURDIR}; ${NXBTMAKE} _includes MK_CLANG=no MK_GCC=no ${_+_}cd ${.CURDIR}; ${NXBTMAKE} _includes MK_CLANG=no MK_GCC=no
${_+_}cd ${.CURDIR}; ${NXBTMAKE} _libraries MK_CLANG=no MK_GCC=no ${_+_}cd ${.CURDIR}; ${NXBTMAKE} _libraries MK_CLANG=no MK_GCC=no
.if !defined(NO_OBJ) .if !defined(NO_OBJWALK)
${_+_}cd ${.CURDIR}; ${NXBMAKE} SUBDIR_OVERRIDE="${NXBDIRS:M*}" _obj ${_+_}cd ${.CURDIR}; ${NXBMAKE} SUBDIR_OVERRIDE="${NXBDIRS:M*}" _obj
.endif .endif
${_+_}cd ${.CURDIR}; ${NXBMAKE} SUBDIR_OVERRIDE="${NXBDIRS:M*}" \ ${_+_}cd ${.CURDIR}; ${NXBMAKE} SUBDIR_OVERRIDE="${NXBDIRS:M*}" \
@ -2504,7 +2504,7 @@ ${_lib}__PL: .PHONY .MAKE
.if exists(${.CURDIR}/${_lib}) .if exists(${.CURDIR}/${_lib})
${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \ ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \
cd ${.CURDIR}/${_lib}; \ cd ${.CURDIR}/${_lib}; \
if [ -z "${NO_OBJ}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; fi; \ if [ -z "${NO_OBJWALK}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; fi; \
${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \
DIRPRFX=${_lib}/ all; \ DIRPRFX=${_lib}/ all; \
${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \
@ -2517,7 +2517,7 @@ ${_lib}__L: .PHONY .MAKE
.if exists(${.CURDIR}/${_lib}) .if exists(${.CURDIR}/${_lib})
${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \ ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \
cd ${.CURDIR}/${_lib}; \ cd ${.CURDIR}/${_lib}; \
if [ -z "${NO_OBJ}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; fi; \ if [ -z "${NO_OBJWALK}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; fi; \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ all; \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ all; \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ install ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ install
.endif .endif
@ -2855,7 +2855,7 @@ _xb-bootstrap-tools: .PHONY
${_yacc} ${_yacc}
${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
cd ${.CURDIR}/${_tool}; \ cd ${.CURDIR}/${_tool}; \
if [ -z "${NO_OBJ}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ obj; fi; \ if [ -z "${NO_OBJWALK}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ obj; fi; \
${CDMAKE} DIRPRFX=${_tool}/ all; \ ${CDMAKE} DIRPRFX=${_tool}/ all; \
${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install ${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install
.endfor .endfor
@ -2877,7 +2877,7 @@ _xb-cross-tools: .PHONY
.for _tool in ${XDEVDIRS} .for _tool in ${XDEVDIRS}
${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,all)"; \ ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,all)"; \
cd ${.CURDIR}/${_tool}; \ cd ${.CURDIR}/${_tool}; \
if [ -z "${NO_OBJ}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ obj; fi; \ if [ -z "${NO_OBJWALK}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ obj; fi; \
${CDMAKE} DIRPRFX=${_tool}/ all ${CDMAKE} DIRPRFX=${_tool}/ all
.endfor .endfor
@ -2912,7 +2912,7 @@ _xi-cross-tools: .PHONY
.endfor .endfor
_xi-includes: .PHONY _xi-includes: .PHONY
.if !defined(NO_OBJ) .if !defined(NO_OBJWALK)
${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 _obj \ ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 _obj \
DESTDIR=${XDDESTDIR} DESTDIR=${XDDESTDIR}
.endif .endif

View File

@ -24,7 +24,7 @@
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd October 26, 2017 .Dd November 3, 2017
.Dt BUILD 7 .Dt BUILD 7
.Os .Os
.Sh NAME .Sh NAME
@ -683,7 +683,7 @@ documentation as part of the
target. target.
.It Va NO_LIBS .It Va NO_LIBS
If set, the libraries phase will be skipped. If set, the libraries phase will be skipped.
.It Va NO_OBJ .It Va NO_OBJWALK
If set, no object directories will be created. If set, no object directories will be created.
This should only be used if object directories were created in a This should only be used if object directories were created in a
previous build and no new directories are connected. previous build and no new directories are connected.
@ -700,7 +700,7 @@ If set, the build target
.Cm buildworld .Cm buildworld
defaults to setting defaults to setting
.Va NO_CLEAN , .Va NO_CLEAN ,
.Va NO_OBJ , .Va NO_OBJWALK ,
and will skip most bootstrap phases. and will skip most bootstrap phases.
It will only bootstrap libraries and build all of userland. It will only bootstrap libraries and build all of userland.
This option should be used only when it is known that none of the bootstrap This option should be used only when it is known that none of the bootstrap

View File

@ -24,11 +24,11 @@ _srcconf_included_:
.MAKE.MODE+= curdirOk=yes .MAKE.MODE+= curdirOk=yes
.endif .endif
.if defined(NO_OBJ) || ${MK_AUTO_OBJ} == "yes" .if defined(NO_OBJWALK) || ${MK_AUTO_OBJ} == "yes"
NO_OBJ= t NO_OBJWALK= t
NO_MODULES_OBJ= t NO_MODULES_OBJ= t
.endif .endif
.if !defined(NO_OBJ) .if !defined(NO_OBJWALK)
_obj= obj _obj= obj
.endif .endif