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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325374
3 changed files with 21 additions and 21 deletions

View File

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

View File

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

View File

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