diff options
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | include/Makefile | 6 | ||||
-rw-r--r-- | share/mk/bsd.dep.mk | 2 | ||||
-rw-r--r-- | share/mk/bsd.subdir.mk | 2 | ||||
-rw-r--r-- | share/mk/local.meta.sys.mk | 2 | ||||
-rw-r--r-- | share/mk/local.sys.mk | 14 | ||||
-rw-r--r-- | share/mk/sys.mk | 12 | ||||
-rw-r--r-- | tools/build/options/WITH_DIRDEPS_BUILD | 37 | ||||
-rw-r--r-- | tools/build/options/WITH_DIRDEPS_CACHE | 2 | ||||
-rw-r--r-- | tools/build/options/WITH_META_FILES | 3 | ||||
-rw-r--r-- | tools/build/options/WITH_META_MODE | 38 | ||||
-rw-r--r-- | tools/build/options/WITH_STAGING | 2 | ||||
-rw-r--r-- | tools/build/options/WITH_SYSROOT | 2 | ||||
-rw-r--r-- | usr.bin/xlint/llib/Makefile | 2 |
14 files changed, 73 insertions, 61 deletions
@@ -106,7 +106,7 @@ # Note: we use this awkward construct to be compatible with FreeBSD's # old make used in 10.0 and 9.2 and earlier. -.if defined(MK_META_MODE) && ${MK_META_MODE} == "yes" && !make(showconfig) +.if defined(MK_DIRDEPS_BUILD) && ${MK_DIRDEPS_BUILD} == "yes" && !make(showconfig) # targets/Makefile plays the role of top-level .include "targets/Makefile" .else @@ -498,15 +498,15 @@ buildLINT: # This makefile does not run in meta mode .MAKE.MODE= normal # Normally the things we run from here don't either. -# Using -DWITH_META_FILES +# Using -DWITH_META_MODE # we can buildworld with meta files created which are useful # for debugging, but without any of the rest of a meta mode build. -MK_META_MODE= no +MK_DIRDEPS_BUILD= no MK_STAGING= no # tell meta.autodep.mk to not even think about updating anything. UPDATE_DEPENDFILE= NO .if !make(showconfig) -.export MK_META_MODE MK_STAGING UPDATE_DEPENDFILE +.export MK_DIRDEPS_BUILD MK_STAGING UPDATE_DEPENDFILE .endif .if make(universe) @@ -516,4 +516,4 @@ MAKE_JOB_ERROR_TOKEN= no .endif .endif # bmake -.endif # META_MODE +.endif # DIRDEPS_BUILD diff --git a/include/Makefile b/include/Makefile index eed1c92..61bfbc6 100644 --- a/include/Makefile +++ b/include/Makefile @@ -166,7 +166,7 @@ compat: mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \ -f ${.CURDIR}/../etc/mtree/BSD.include.dist \ -p ${DESTDIR}${INCLUDEDIR} > /dev/null -.if ${MK_META_MODE} == "yes" +.if ${MK_DIRDEPS_BUILD} == "yes" @touch ${.TARGET} .endif @@ -255,7 +255,7 @@ copies: cd ${.CURDIR}/../sys/teken; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 teken.h \ ${DESTDIR}${INCLUDEDIR}/teken -.if ${MK_META_MODE} == "yes" +.if ${MK_DIRDEPS_BUILD} == "yes" @touch ${.OBJDIR}/${.TARGET} .endif @@ -372,7 +372,7 @@ symlinks: ln -fs ../../../sys/rpc/$$h \ ${DESTDIR}${INCLUDEDIR}/rpc; \ done -.if ${MK_META_MODE} == "yes" +.if ${MK_DIRDEPS_BUILD} == "yes" @touch ${.OBJDIR}/${.TARGET} .endif diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index ffe3926..2e5e486 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -163,7 +163,7 @@ beforedepend: ${DHDRS} beforebuild: ${DHDRS} .endif -.if ${MK_META_MODE} == "yes" +.if ${MK_DIRDEPS_BUILD} == "yes" .include <meta.autodep.mk> # this depend: bypasses that below # the dependency helps when bootstrapping diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index f9b9e97..ec2585f 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -49,7 +49,7 @@ STANDALONE_SUBDIR_TARGETS?= obj checkdpadd clean cleandepend cleandir \ .include <bsd.init.mk> .if !defined(NEED_SUBDIR) -.if ${.MAKE.LEVEL} == 0 && ${MK_META_MODE} == "yes" && !empty(SUBDIR) && !(make(clean*) || make(destroy*)) +.if ${.MAKE.LEVEL} == 0 && ${MK_DIRDEPS_BUILD} == "yes" && !empty(SUBDIR) && !(make(clean*) || make(destroy*)) .include <meta.subdir.mk> # ignore this _SUBDIR: diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk index 87e9f01..230850c 100644 --- a/share/mk/local.meta.sys.mk +++ b/share/mk/local.meta.sys.mk @@ -2,7 +2,7 @@ # local configuration specific to meta mode # XXX some of this should be in meta.sys.mk -# we assume that MK_META_MODE=yes +# we assume that MK_DIRDEPS_BUILD=yes # we need this until there is an alternative MK_INSTALL_AS_USER= yes diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk index d542f8b..7022dad 100644 --- a/share/mk/local.sys.mk +++ b/share/mk/local.sys.mk @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${MK_META_MODE} == "yes" +.if ${MK_DIRDEPS_BUILD} == "yes" MAKE_PRINT_VAR_ON_ERROR+= \ .CURDIR \ .MAKE \ @@ -23,3 +23,15 @@ MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH .endif .include "src.sys.mk" + +.if ${.MAKE.MODE:Unormal:Mmeta*} != "" +# we can afford to use cookies to prevent some targets +# re-running needlessly +META_COOKIE_TOUCH= touch ${COOKIE.${.TARGET}:U${.OBJDIR}/${.TARGET}} +# some targets need to be .PHONY - but not in meta mode +META_NOPHONY= +.else +META_COOKIE_TOUCH= +META_NOPHONY= .PHONY +.endif + diff --git a/share/mk/sys.mk b/share/mk/sys.mk index ee0797e..4ec1a6b 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -20,14 +20,14 @@ MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm # Some options we need now __DEFAULT_NO_OPTIONS= \ DIRDEPS_CACHE \ + DIRDEPS_BUILD \ META_MODE \ - META_FILES \ __DEFAULT_DEPENDENT_OPTIONS= \ - AUTO_OBJ/META_MODE \ - STAGING/META_MODE \ - SYSROOT/META_MODE + AUTO_OBJ/DIRDEPS_BUILD \ + STAGING/DIRDEPS_BUILD \ + SYSROOT/DIRDEPS_BUILD __ENV_ONLY_OPTIONS:= \ ${__DEFAULT_NO_OPTIONS} \ @@ -43,9 +43,9 @@ __ENV_ONLY_OPTIONS:= \ .include <bsd.mkopt.mk> -.if ${MK_META_MODE} == "yes" +.if ${MK_DIRDEPS_BUILD} == "yes" .sinclude <meta.sys.mk> -.elif ${MK_META_FILES} == "yes" && defined(.MAKEFLAGS) +.elif ${MK_META_MODE} == "yes" && defined(.MAKEFLAGS) .if ${.MAKEFLAGS:M-B} == "" .MAKE.MODE= meta verbose .endif diff --git a/tools/build/options/WITH_DIRDEPS_BUILD b/tools/build/options/WITH_DIRDEPS_BUILD new file mode 100644 index 0000000..eafe857 --- /dev/null +++ b/tools/build/options/WITH_DIRDEPS_BUILD @@ -0,0 +1,37 @@ +.\" $FreeBSD$ +Enable building in meta mode. +This is an experimental build feature. +For details see +http://www.crufty.net/sjg/docs/freebsd-meta-mode.htm. +.Pp +The build is driven by dirdeps.mk using +.Va DIRDEPS +stored in +Makefile.depend files found in each directory. +.Pp +The build can be started from anywhere, and behaves the same. +The initial instance of +.Xr make 1 +recursively reads +.Va DIRDEPS +from Makefile.depend +computing a graph of tree dependencies from the current origin. +Setting +.Va NO_DIRDEPS +will skip checking dirdep dependencies and will only build in the current +directory. +.Pp +As each target is made +.Xr make 1 +produces a meta file which is used to capture (and compare) +the command line, +as well as any command output. +If +.Xr filemon 4 +is available the meta file will also capture a record of files +used to produce the target by tracking syscalls. +.Pp +The build will hide commands ran unless +.Va NO_SILENT +is defined. +.Pp diff --git a/tools/build/options/WITH_DIRDEPS_CACHE b/tools/build/options/WITH_DIRDEPS_CACHE index 7bb4622..e4fec02 100644 --- a/tools/build/options/WITH_DIRDEPS_CACHE +++ b/tools/build/options/WITH_DIRDEPS_CACHE @@ -2,4 +2,4 @@ Cache result of dirdeps.mk which can save significant time for subsequent builds. Depends on -.Va WITH_META_MODE . +.Va WITH_DIRDEPS_BUILD . diff --git a/tools/build/options/WITH_META_FILES b/tools/build/options/WITH_META_FILES deleted file mode 100644 index ab19d3d..0000000 --- a/tools/build/options/WITH_META_FILES +++ /dev/null @@ -1,3 +0,0 @@ -.\" $FreeBSD$ -Create meta files during non META_MODE build. -The meta files can be useful for debugging. diff --git a/tools/build/options/WITH_META_MODE b/tools/build/options/WITH_META_MODE index eafe857..6f2f296 100644 --- a/tools/build/options/WITH_META_MODE +++ b/tools/build/options/WITH_META_MODE @@ -1,37 +1,3 @@ .\" $FreeBSD$ -Enable building in meta mode. -This is an experimental build feature. -For details see -http://www.crufty.net/sjg/docs/freebsd-meta-mode.htm. -.Pp -The build is driven by dirdeps.mk using -.Va DIRDEPS -stored in -Makefile.depend files found in each directory. -.Pp -The build can be started from anywhere, and behaves the same. -The initial instance of -.Xr make 1 -recursively reads -.Va DIRDEPS -from Makefile.depend -computing a graph of tree dependencies from the current origin. -Setting -.Va NO_DIRDEPS -will skip checking dirdep dependencies and will only build in the current -directory. -.Pp -As each target is made -.Xr make 1 -produces a meta file which is used to capture (and compare) -the command line, -as well as any command output. -If -.Xr filemon 4 -is available the meta file will also capture a record of files -used to produce the target by tracking syscalls. -.Pp -The build will hide commands ran unless -.Va NO_SILENT -is defined. -.Pp +Create meta files when not doing DIRDEPS_BUILD. +The meta files can be useful for debugging. diff --git a/tools/build/options/WITH_STAGING b/tools/build/options/WITH_STAGING index 36ec818..e6bb304 100644 --- a/tools/build/options/WITH_STAGING +++ b/tools/build/options/WITH_STAGING @@ -4,4 +4,4 @@ This can be best thought of as auto-install to .Va DESTDIR with some extra meta data to ensure dependencies can be tracked. Depends on -.Va WITH_META_MODE . +.Va WITH_DIRDEPS_BUILD . diff --git a/tools/build/options/WITH_SYSROOT b/tools/build/options/WITH_SYSROOT index 64c0fc8..49a1f36 100644 --- a/tools/build/options/WITH_SYSROOT +++ b/tools/build/options/WITH_SYSROOT @@ -1,4 +1,4 @@ .\" $FreeBSD$ Enable use of sysroot during build. Depends on -.Va WITH_META_MODE . +.Va WITH_DIRDEPS_BUILD . diff --git a/usr.bin/xlint/llib/Makefile b/usr.bin/xlint/llib/Makefile index 63b2b2b..bcf93c4 100644 --- a/usr.bin/xlint/llib/Makefile +++ b/usr.bin/xlint/llib/Makefile @@ -16,6 +16,6 @@ llib-lstdc.ln: llib-lstdc .include <bsd.prog.mk> -.if ${MK_META_MODE} == "yes" +.if ${MK_DIRDEPS_BUILD} == "yes" LINTFLAGS+= -I${STAGE_INCLUDEDIR} .endif |