Date: Tue, 9 May 2017 20:21:39 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318105 - in head: . share/man/man7 sys/conf Message-ID: <201705092021.v49KLd3J030985@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Tue May 9 20:21:38 2017 New Revision: 318105 URL: https://svnweb.freebsd.org/changeset/base/318105 Log: 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 Modified: head/Makefile.inc1 head/Makefile.libcompat head/share/man/man7/build.7 head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue May 9 20:14:58 2017 (r318104) +++ head/Makefile.inc1 Tue May 9 20:21:38 2017 (r318105) @@ -310,6 +310,13 @@ CLEANDIR= cleandir NO_CLEAN= t .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?= PACKAGEDIR?= ${DESTDIR}/${DISTDIR} @@ -828,7 +835,11 @@ WMAKE_TGTS+= _worldtmp _legacy .if empty(SUBDIR_OVERRIDE) WMAKE_TGTS+= _bootstrap-tools .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+= _includes _libraries WMAKE_TGTS+= everything @@ -1610,7 +1621,7 @@ legacy: .PHONY .for _tool in tools/build ${_elftoolchain_libs} ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \ 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}/ MK_INCLUDES=no all; \ ${MAKE} DIRPRFX=${_tool}/ MK_INCLUDES=no \ @@ -1766,7 +1777,7 @@ bootstrap-tools: .PHONY ${_bt}-${_tool}: .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ - ${MAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install @@ -1805,7 +1816,7 @@ _rescue=rescue/rescue build-tools_${_tool}: .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \ cd ${.CURDIR}/${_tool}; \ - ${MAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ ${MAKE} DIRPRFX=${_tool}/ build-tools build-tools: build-tools_${_tool} .endfor @@ -1814,7 +1825,7 @@ build-tools: build-tools_${_tool} build-tools_${_tool}: .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (obj,all)"; \ cd ${.CURDIR}/${_tool}; \ - ${MAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ ${MAKE} DIRPRFX=${_tool}/ all build-tools: build-tools_${_tool} .endfor @@ -1899,7 +1910,7 @@ cross-tools: .MAKE .PHONY ${_usb_tools} ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ - ${MAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install .endfor @@ -1931,7 +1942,7 @@ native-xtools: .PHONY mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin ${_+_}@${ECHODIR} "===> ${_gperf} (obj,all,install)"; \ cd ${.CURDIR}/${_gperf}; \ - ${NXBMAKE} DIRPRFX=${_gperf}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${NXBMAKE} DIRPRFX=${_gperf}/ obj; fi; \ ${NXBMAKE} DIRPRFX=${_gperf}/ all; \ ${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install .endif @@ -2007,7 +2018,7 @@ native-xtools: .PHONY usr.sbin/chown ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ - ${NXBMAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${NXBMAKE} DIRPRFX=${_tool}/ obj; fi; \ ${NXBMAKE} DIRPRFX=${_tool}/ all; \ ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install .endfor @@ -2269,7 +2280,7 @@ ${_lib}__PL: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \ 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 \ DIRPRFX=${_lib}/ all; \ ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ @@ -2282,7 +2293,7 @@ ${_lib}__L: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \ 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}/ install .endif @@ -2609,7 +2620,7 @@ _xb-bootstrap-tools: .PHONY ${_yacc} ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ - ${CDMAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ obj; fi; \ ${CDMAKE} DIRPRFX=${_tool}/ all; \ ${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install .endfor @@ -2628,7 +2639,7 @@ _xb-cross-tools: .PHONY ${_gcc} ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,all)"; \ cd ${.CURDIR}/${_tool}; \ - ${CDMAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ obj; fi; \ ${CDMAKE} DIRPRFX=${_tool}/ all .endfor Modified: head/Makefile.libcompat ============================================================================== --- head/Makefile.libcompat Tue May 9 20:14:58 2017 (r318104) +++ head/Makefile.libcompat Tue May 9 20:21:38 2017 (r318105) @@ -163,7 +163,7 @@ build${libcompat}: .PHONY .endif mkdir -p ${WORLDTMP} ln -sf ${.CURDIR}/sys ${WORLDTMP} -.for _t in obj includes +.for _t in ${_obj} includes .for _dir in ${_LC_INCDIRS} ${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATWMAKE} MK_INCLUDES=yes \ DIRPRFX=${_dir}/ ${_t} @@ -180,7 +180,7 @@ build${libcompat}: .PHONY ${_+_}cd ${.CURDIR}; \ ${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries .if ${libcompat} == "32" -.for _t in obj all +.for _t in ${_obj} all ${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIBCOMPATWMAKE} \ -DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t} ${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATWMAKE} \ Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Tue May 9 20:14:58 2017 (r318104) +++ head/share/man/man7/build.7 Tue May 9 20:21:38 2017 (r318105) @@ -605,6 +605,10 @@ If set, the update process does not upda documentation as part of the .Dq make update 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 If set, the update process does not update the Ports tree as part of the .Dq make update Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue May 9 20:14:58 2017 (r318104) +++ head/sys/conf/kern.post.mk Tue May 9 20:21:38 2017 (r318105) @@ -35,7 +35,7 @@ KERN_DEBUGDIR?= ${DEBUGDIR} .MAIN: all .for target in all clean cleandepend cleandir clobber depend install \ - obj reinstall tags + ${_obj} reinstall tags ${target}: kernel-${target} .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules) ${target}: modules-${target} Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue May 9 20:14:58 2017 (r318104) +++ head/sys/conf/kern.pre.mk Tue May 9 20:21:38 2017 (r318105) @@ -24,6 +24,14 @@ _srcconf_included_: .MAKE.MODE+= curdirOk=yes .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 KERNEL_KO?= kernel KERNEL?= kernel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705092021.v49KLd3J030985>