Index: head/share/man/man5/Makefile =================================================================== --- head/share/man/man5/Makefile (revision 287924) +++ head/share/man/man5/Makefile (revision 287925) @@ -1,107 +1,108 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ .include #MISSING: dump.5 plot.5 MAN= acct.5 \ ar.5 \ a.out.5 \ bluetooth.device.conf.5 \ bluetooth.hosts.5 \ bluetooth.protocols.5 \ ${_boot.config.5} \ core.5 \ devfs.5 \ devfs.conf.5 \ devfs.rules.5 \ device.hints.5 \ dir.5 \ disktab.5 \ elf.5 \ ethers.5 \ eui64.5 \ ext2fs.5 \ fbtab.5 \ fdescfs.5 \ forward.5 \ fs.5 \ fstab.5 \ group.5 \ hosts.5 \ hosts.equiv.5 \ hosts.lpd.5 \ intro.5 \ libmap.conf.5 \ link.5 \ linprocfs.5 \ linsysfs.5 \ mailer.conf.5 \ make.conf.5 \ moduli.5 \ motd.5 \ mqueuefs.5 \ msdosfs.5 \ networks.5 \ nsmb.conf.5 \ nsswitch.conf.5 \ nullfs.5 \ passwd.5 \ pbm.5 \ periodic.conf.5 \ phones.5 \ portindex.5 \ portsnap.conf.5 \ procfs.5 \ protocols.5 \ quota.user.5 \ rc.conf.5 \ rctl.conf.5 \ regdomain.5 \ reiserfs.5 \ remote.5 \ resolver.5 \ services.5 \ shells.5 \ src.conf.5 \ stab.5 \ style.Makefile.5 \ sysctl.conf.5 \ tmpfs.5 MLINKS= dir.5 dirent.5 MLINKS+=fs.5 inode.5 MLINKS+=hosts.equiv.5 rhosts.5 MLINKS+=msdosfs.5 msdos.5 MLINKS+=passwd.5 master.passwd.5 MLINKS+=portindex.5 INDEX.5 MLINKS+=quota.user.5 quota.group.5 MLINKS+=rc.conf.5 rc.conf.local.5 MLINKS+=resolver.5 resolv.conf.5 +MLINKS+=src.conf.5 src-env.conf.5 .if ${MK_AUTOFS} != "no" MAN+= autofs.5 .endif .if ${MK_FREEBSD_UPDATE} != "no" MAN+= freebsd-update.conf.5 .endif .if ${MK_HESIOD} != "no" MAN+= hesiod.conf.5 .endif .if ${MK_NAND} != "no" MAN+= nandfs.5 .endif .if ${MK_PF} != "no" MAN+= pf.conf.5 \ pf.os.5 .endif .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" _boot.config.5= boot.config.5 .endif .include Index: head/tools/build/options/WITH_META_MODE =================================================================== --- head/tools/build/options/WITH_META_MODE (revision 287924) +++ head/tools/build/options/WITH_META_MODE (revision 287925) @@ -1,31 +1,36 @@ .\" $FreeBSD$ Enable building in meta mode. .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. See http://www.crufty.net/help/sjg/dirdeps.htm .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 +This must be set in the environment or +.Pa /etc/src-env.conf , +not +.Pa /etc/src.conf . +.Pp The build will hide commands ran unless .Va NO_SILENT is defined. .Pp Index: head/tools/build/options/makeman =================================================================== --- head/tools/build/options/makeman (revision 287924) +++ head/tools/build/options/makeman (revision 287925) @@ -1,313 +1,326 @@ #!/bin/sh # # This file is in the public domain. set -o errexit LC_ALL=C ident='$FreeBSD$' t=$(mktemp -d -t makeman) trap 'test -d $t && rm -rf $t' exit srcdir=$(realpath ../../..) make="make -C $srcdir -m $srcdir/share/mk" # # usage: no_targets all_targets yes_targets # no_targets() { for t1 in $1 ; do for t2 in $2 ; do if [ "${t1}" = "${t2}" ] ; then continue 2 fi done echo ${t1} done } show_options() { ALL_TARGETS=$(echo $(${make} targets | tail -n +2)) rm -f $t/settings for target in ${ALL_TARGETS} ; do ${make} showconfig \ SRCCONF=/dev/null __MAKE_CONF=/dev/null \ TARGET_ARCH=${target#*/} TARGET=${target%/*} | while read var _ val ; do opt=${var#MK_} case ${val} in yes) echo ${opt} ${target} ;; no) echo ${opt} ;; *) echo "make showconfig broken: ${var} ${_} ${val} (not yes or no)" >&2 exit 1 ;; esac done > $t/settings.target if [ -r $t/settings ] ; then join -t\ $t/settings $t/settings.target > $t/settings.new mv $t/settings.new $t/settings else mv $t/settings.target $t/settings fi done cat $t/settings | while read opt targets ; do if [ "${targets}" = "${ALL_TARGETS}" ] ; then echo "WITHOUT_${opt}" elif [ -z "${targets}" ] ; then echo "WITH_${opt}" else echo "WITHOUT_${opt}" $(no_targets "${ALL_TARGETS}" "${targets}") echo "WITH_${opt} ${targets}" fi done } # # usage: show { settings | with | without } ... # show() { mode=$1 ; shift case ${mode} in settings) yes_prefix=WITH no_prefix=WITHOUT ;; with) yes_prefix=WITH no_prefix=WITH ;; without) yes_prefix=WITHOUT no_prefix=WITHOUT ;; *) echo 'internal error' >&2 exit 1 ;; esac ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null | while read var _ val ; do opt=${var#MK_} case ${val} in yes) echo ${yes_prefix}_${opt} ;; no) echo ${no_prefix}_${opt} ;; *) echo "make showconfig broken: ${var} ${_} ${val} (not yes or no)" >&2 exit 1 ;; esac done } main() { ident=${ident#$} ident=${ident% $} fbsdid='$'FreeBSD'$' cat < $t/config_default # Work around WITH_LDNS_UTILS forcing BIND_UTILS off by parsing the # actual config that results from enabling every WITH_ option. This # can be reverted if/when we no longer have options that disable # others. show with SRCCONF=/dev/null | sort | sed 's/$/=/' > $t/src.conf show settings SRCCONF=$t/src.conf | sort > $t/config_WITH_ALL show without SRCCONF=/dev/null | sort > $t/config_WITHOUT_ALL show_options | while read opt targets ; do if [ ! -f ${opt} ] ; then echo "no description found for ${opt}, skipping" >&2 continue fi echo ".It Va ${opt}" sed -e's/\$\(FreeBSD: .*\) \$/from \1/' ${opt} if [ -n "${targets}" ] ; then echo '.Pp' echo 'It is a default setting on' echo $(echo ${targets} | sed -e's/ /, /g' -e's/\(.*\), /\1 and /'). fi if [ "${opt%%_*}" = 'WITHOUT' ] ; then sed -n "/^WITH_${opt#WITHOUT_}$/!s/$/=/p" $t/config_WITH_ALL > $t/src.conf show settings SRCCONF=$t/src.conf -D${opt} | sort > $t/config_WITH_ALL_${opt} comm -13 $t/config_WITH_ALL $t/config_WITH_ALL_${opt} | sed -n "/^${opt}$/!p" > $t/deps elif [ "${opt%%_*}" = 'WITH' ] ; then sed -n "/^WITHOUT${opt#WITH}$/!s/$/=/p" $t/config_WITHOUT_ALL > $t/src.conf show settings SRCCONF=$t/src.conf -D${opt} | sort > $t/config_WITHOUT_ALL_${opt} comm -13 $t/config_WITHOUT_ALL $t/config_WITHOUT_ALL_${opt} | sed -n "/^${opt}$/!p" > $t/deps else echo 'internal error' >&2 exit 1 fi show settings SRCCONF=/dev/null -D${opt} | sort > $t/config_${opt} comm -13 $t/config_default $t/config_${opt} | sed -n "/^${opt}$/!p" | comm -13 $t/deps - > $t/deps2 # Work around BIND_UTILS=no being the default when every WITH_ # option is enabled. if [ "$(cat $t/deps2)" = WITHOUT_BIND_UTILS ]; then sort $t/deps $t/deps2 > $t/_deps mv $t/_deps $t/deps :> $t/deps2 fi if [ -s $t/deps ] ; then echo 'When set, it also enforces the following options:' echo '.Pp' echo '.Bl -item -compact' cat $t/deps | while read opt2 ; do echo '.It' echo ".Va ${opt2}" done echo '.El' fi if [ -s $t/deps2 ] ; then if [ -s $t/deps ] ; then echo '.Pp' fi echo 'When set, the following options are also in effect:' echo '.Pp' echo '.Bl -inset -compact' cat $t/deps2 | while read opt2 ; do echo ".It Va ${opt2}" noopt=$(echo ${opt2} | sed -e's/WITH_/WITHOUT_/;t' -e's/WITHOUT_/WITH_/') echo '(unless' echo ".Va ${noopt}" echo 'is set explicitly)' done echo '.El' fi twiddle >&2 done cat <