Support skipping 'make obj' tree-walk.
This is part of a larger effort for WITH_AUTO_OBJ and a WORLDFAST option. Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
e9b7132b30
commit
6d75a7a852
@ -310,6 +310,13 @@ CLEANDIR= cleandir
|
|||||||
NO_CLEAN= t
|
NO_CLEAN= t
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
.if defined(NO_OBJ) || ${MK_AUTO_OBJ} == "yes"
|
||||||
|
NO_OBJ= t
|
||||||
|
NO_KERNELOBJ= t
|
||||||
|
.endif
|
||||||
|
.if !defined(NO_OBJ)
|
||||||
|
_obj= obj
|
||||||
|
.endif
|
||||||
|
|
||||||
LOCAL_TOOL_DIRS?=
|
LOCAL_TOOL_DIRS?=
|
||||||
PACKAGEDIR?= ${DESTDIR}/${DISTDIR}
|
PACKAGEDIR?= ${DESTDIR}/${DISTDIR}
|
||||||
@ -828,7 +835,11 @@ WMAKE_TGTS+= _worldtmp _legacy
|
|||||||
.if empty(SUBDIR_OVERRIDE)
|
.if empty(SUBDIR_OVERRIDE)
|
||||||
WMAKE_TGTS+= _bootstrap-tools
|
WMAKE_TGTS+= _bootstrap-tools
|
||||||
.endif
|
.endif
|
||||||
WMAKE_TGTS+= _cleanobj _obj _build-tools _cross-tools
|
WMAKE_TGTS+= _cleanobj
|
||||||
|
.if !defined(NO_OBJ)
|
||||||
|
WMAKE_TGTS+= _obj
|
||||||
|
.endif
|
||||||
|
WMAKE_TGTS+= _build-tools _cross-tools
|
||||||
WMAKE_TGTS+= _compiler-metadata
|
WMAKE_TGTS+= _compiler-metadata
|
||||||
WMAKE_TGTS+= _includes _libraries
|
WMAKE_TGTS+= _includes _libraries
|
||||||
WMAKE_TGTS+= everything
|
WMAKE_TGTS+= everything
|
||||||
@ -1610,7 +1621,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}; \
|
||||||
${MAKE} DIRPRFX=${_tool}/ obj; \
|
if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
|
||||||
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \
|
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/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 \
|
||||||
@ -1766,7 +1777,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}; \
|
||||||
${MAKE} DIRPRFX=${_tool}/ obj; \
|
if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
|
||||||
${MAKE} DIRPRFX=${_tool}/ all; \
|
${MAKE} DIRPRFX=${_tool}/ all; \
|
||||||
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
|
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
|
||||||
|
|
||||||
@ -1805,7 +1816,7 @@ _rescue=rescue/rescue
|
|||||||
build-tools_${_tool}: .PHONY
|
build-tools_${_tool}: .PHONY
|
||||||
${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
|
${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
|
||||||
cd ${.CURDIR}/${_tool}; \
|
cd ${.CURDIR}/${_tool}; \
|
||||||
${MAKE} DIRPRFX=${_tool}/ obj; \
|
if [ -z "${NO_OBJ}" ]; 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
|
||||||
@ -1814,7 +1825,7 @@ build-tools: build-tools_${_tool}
|
|||||||
build-tools_${_tool}: .PHONY
|
build-tools_${_tool}: .PHONY
|
||||||
${_+_}@${ECHODIR} "===> ${_tool} (obj,all)"; \
|
${_+_}@${ECHODIR} "===> ${_tool} (obj,all)"; \
|
||||||
cd ${.CURDIR}/${_tool}; \
|
cd ${.CURDIR}/${_tool}; \
|
||||||
${MAKE} DIRPRFX=${_tool}/ obj; \
|
if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
|
||||||
${MAKE} DIRPRFX=${_tool}/ all
|
${MAKE} DIRPRFX=${_tool}/ all
|
||||||
build-tools: build-tools_${_tool}
|
build-tools: build-tools_${_tool}
|
||||||
.endfor
|
.endfor
|
||||||
@ -1899,7 +1910,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}; \
|
||||||
${MAKE} DIRPRFX=${_tool}/ obj; \
|
if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
|
||||||
${MAKE} DIRPRFX=${_tool}/ all; \
|
${MAKE} DIRPRFX=${_tool}/ all; \
|
||||||
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install
|
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install
|
||||||
.endfor
|
.endfor
|
||||||
@ -1931,7 +1942,7 @@ native-xtools: .PHONY
|
|||||||
mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin
|
mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin
|
||||||
${_+_}@${ECHODIR} "===> ${_gperf} (obj,all,install)"; \
|
${_+_}@${ECHODIR} "===> ${_gperf} (obj,all,install)"; \
|
||||||
cd ${.CURDIR}/${_gperf}; \
|
cd ${.CURDIR}/${_gperf}; \
|
||||||
${NXBMAKE} DIRPRFX=${_gperf}/ obj; \
|
if [ -z "${NO_OBJ}" ]; then ${NXBMAKE} DIRPRFX=${_gperf}/ obj; fi; \
|
||||||
${NXBMAKE} DIRPRFX=${_gperf}/ all; \
|
${NXBMAKE} DIRPRFX=${_gperf}/ all; \
|
||||||
${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install
|
${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install
|
||||||
.endif
|
.endif
|
||||||
@ -2007,7 +2018,7 @@ native-xtools: .PHONY
|
|||||||
usr.sbin/chown
|
usr.sbin/chown
|
||||||
${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
|
${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
|
||||||
cd ${.CURDIR}/${_tool}; \
|
cd ${.CURDIR}/${_tool}; \
|
||||||
${NXBMAKE} DIRPRFX=${_tool}/ obj; \
|
if [ -z "${NO_OBJ}" ]; then ${NXBMAKE} DIRPRFX=${_tool}/ obj; fi; \
|
||||||
${NXBMAKE} DIRPRFX=${_tool}/ all; \
|
${NXBMAKE} DIRPRFX=${_tool}/ all; \
|
||||||
${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install
|
${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install
|
||||||
.endfor
|
.endfor
|
||||||
@ -2269,7 +2280,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}; \
|
||||||
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \
|
if [ -z "${NO_OBJ}" ]; 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 \
|
||||||
@ -2282,7 +2293,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}; \
|
||||||
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \
|
if [ -z "${NO_OBJ}" ]; 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
|
||||||
@ -2609,7 +2620,7 @@ _xb-bootstrap-tools: .PHONY
|
|||||||
${_yacc}
|
${_yacc}
|
||||||
${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
|
${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
|
||||||
cd ${.CURDIR}/${_tool}; \
|
cd ${.CURDIR}/${_tool}; \
|
||||||
${CDMAKE} DIRPRFX=${_tool}/ obj; \
|
if [ -z "${NO_OBJ}" ]; 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
|
||||||
@ -2628,7 +2639,7 @@ _xb-cross-tools: .PHONY
|
|||||||
${_gcc}
|
${_gcc}
|
||||||
${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,all)"; \
|
${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,all)"; \
|
||||||
cd ${.CURDIR}/${_tool}; \
|
cd ${.CURDIR}/${_tool}; \
|
||||||
${CDMAKE} DIRPRFX=${_tool}/ obj; \
|
if [ -z "${NO_OBJ}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ obj; fi; \
|
||||||
${CDMAKE} DIRPRFX=${_tool}/ all
|
${CDMAKE} DIRPRFX=${_tool}/ all
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ build${libcompat}: .PHONY
|
|||||||
.endif
|
.endif
|
||||||
mkdir -p ${WORLDTMP}
|
mkdir -p ${WORLDTMP}
|
||||||
ln -sf ${.CURDIR}/sys ${WORLDTMP}
|
ln -sf ${.CURDIR}/sys ${WORLDTMP}
|
||||||
.for _t in obj includes
|
.for _t in ${_obj} includes
|
||||||
.for _dir in ${_LC_INCDIRS}
|
.for _dir in ${_LC_INCDIRS}
|
||||||
${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATWMAKE} MK_INCLUDES=yes \
|
${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATWMAKE} MK_INCLUDES=yes \
|
||||||
DIRPRFX=${_dir}/ ${_t}
|
DIRPRFX=${_dir}/ ${_t}
|
||||||
@ -180,7 +180,7 @@ build${libcompat}: .PHONY
|
|||||||
${_+_}cd ${.CURDIR}; \
|
${_+_}cd ${.CURDIR}; \
|
||||||
${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries
|
${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries
|
||||||
.if ${libcompat} == "32"
|
.if ${libcompat} == "32"
|
||||||
.for _t in obj all
|
.for _t in ${_obj} all
|
||||||
${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIBCOMPATWMAKE} \
|
${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIBCOMPATWMAKE} \
|
||||||
-DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t}
|
-DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t}
|
||||||
${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATWMAKE} \
|
${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATWMAKE} \
|
||||||
|
@ -605,6 +605,10 @@ If set, the update process does not update the source of the
|
|||||||
documentation as part of the
|
documentation as part of the
|
||||||
.Dq make update
|
.Dq make update
|
||||||
target.
|
target.
|
||||||
|
.It Va NO_OBJ
|
||||||
|
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.
|
||||||
.It Va NO_PORTSUPDATE
|
.It Va NO_PORTSUPDATE
|
||||||
If set, the update process does not update the Ports tree as part of the
|
If set, the update process does not update the Ports tree as part of the
|
||||||
.Dq make update
|
.Dq make update
|
||||||
|
@ -35,7 +35,7 @@ KERN_DEBUGDIR?= ${DEBUGDIR}
|
|||||||
.MAIN: all
|
.MAIN: all
|
||||||
|
|
||||||
.for target in all clean cleandepend cleandir clobber depend install \
|
.for target in all clean cleandepend cleandir clobber depend install \
|
||||||
obj reinstall tags
|
${_obj} reinstall tags
|
||||||
${target}: kernel-${target}
|
${target}: kernel-${target}
|
||||||
.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules)
|
.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules)
|
||||||
${target}: modules-${target}
|
${target}: modules-${target}
|
||||||
|
@ -24,6 +24,14 @@ _srcconf_included_:
|
|||||||
.MAKE.MODE+= curdirOk=yes
|
.MAKE.MODE+= curdirOk=yes
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if defined(NO_OBJ) || ${MK_AUTO_OBJ} == "yes"
|
||||||
|
NO_OBJ= t
|
||||||
|
NO_MODULES_OBJ= t
|
||||||
|
.endif
|
||||||
|
.if !defined(NO_OBJ)
|
||||||
|
_obj= obj
|
||||||
|
.endif
|
||||||
|
|
||||||
# Can be overridden by makeoptions or /etc/make.conf
|
# Can be overridden by makeoptions or /etc/make.conf
|
||||||
KERNEL_KO?= kernel
|
KERNEL_KO?= kernel
|
||||||
KERNEL?= kernel
|
KERNEL?= kernel
|
||||||
|
Loading…
Reference in New Issue
Block a user