head	1.17;
access;
symbols
	RELENG_8_4:1.14.0.2
	RELENG_9_1_0_RELEASE:1.12.2.2.2.2
	RELENG_9_1:1.12.2.2.0.2
	RELENG_9_1_BP:1.12.2.2
	RELENG_8_3_0_RELEASE:1.9.2.1.8.1
	RELENG_8_3:1.9.2.1.0.8
	RELENG_8_3_BP:1.9.2.1
	RELENG_9_0_0_RELEASE:1.12.2.1.2.1
	RELENG_9_0:1.12.2.1.0.2
	RELENG_9_0_BP:1.12.2.1
	RELENG_9:1.12.0.2
	RELENG_9_BP:1.12
	RELENG_7_4_0_RELEASE:1.6.2.2.8.1
	RELENG_8_2_0_RELEASE:1.9.2.1.6.1
	RELENG_7_4:1.6.2.2.0.8
	RELENG_7_4_BP:1.6.2.2
	RELENG_8_2:1.9.2.1.0.6
	RELENG_8_2_BP:1.9.2.1
	RELENG_8_1_0_RELEASE:1.9.2.1.4.1
	RELENG_8_1:1.9.2.1.0.4
	RELENG_8_1_BP:1.9.2.1
	RELENG_7_3_0_RELEASE:1.6.2.2.6.1
	RELENG_7_3:1.6.2.2.0.6
	RELENG_7_3_BP:1.6.2.2
	RELENG_8_0_0_RELEASE:1.9.2.1.2.1
	RELENG_8_0:1.9.2.1.0.2
	RELENG_8_0_BP:1.9.2.1
	RELENG_8:1.9.0.2
	RELENG_8_BP:1.9
	RELENG_7_2_0_RELEASE:1.6.2.2.4.1
	RELENG_7_2:1.6.2.2.0.4
	RELENG_7_2_BP:1.6.2.2
	RELENG_7_1_0_RELEASE:1.6.2.2.2.1
	RELENG_7_1:1.6.2.2.0.2
	RELENG_7_1_BP:1.6.2.2
	RELENG_7_0_0_RELEASE:1.6.2.1.2.1
	RELENG_7_0:1.6.2.1.0.2
	RELENG_7_0_BP:1.6.2.1
	RELENG_7:1.6.0.2
	RELENG_7_BP:1.6;
locks; strict;
comment	@# @;


1.17
date	2013.07.13.00.49.28;	author svnexp;	state Exp;
branches;
next	1.16;

1.16
date	2013.06.14.00.34.38;	author svnexp;	state Exp;
branches;
next	1.15;

1.15
date	2013.06.11.00.30.53;	author svnexp;	state Exp;
branches;
next	1.14;

1.14
date	2012.11.17.01.53.38;	author svnexp;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2012.05.30.02.37.20;	author gjb;	state Exp;
branches;
next	1.12;

1.12
date	2011.05.10.13.01.11;	author ru;	state Exp;
branches
	1.12.2.1;
next	1.11;

1.11
date	2011.05.10.12.57.39;	author ru;	state Exp;
branches;
next	1.10;

1.10
date	2011.05.10.11.14.40;	author ru;	state Exp;
branches;
next	1.9;

1.9
date	2009.02.20.11.09.55;	author mtm;	state Exp;
branches
	1.9.2.1;
next	1.8;

1.8
date	2007.12.12.16.39.31;	author ru;	state Exp;
branches;
next	1.7;

1.7
date	2007.11.06.23.12.53;	author danger;	state Exp;
branches;
next	1.6;

1.6
date	2006.09.11.13.39.44;	author ru;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2006.07.31.12.41.13;	author yar;	state Exp;
branches;
next	1.4;

1.4
date	2006.05.20.04.32.10;	author trhodes;	state Exp;
branches;
next	1.3;

1.3
date	2006.05.16.18.59.00;	author trhodes;	state Exp;
branches;
next	1.2;

1.2
date	2006.03.21.09.08.45;	author ru;	state Exp;
branches;
next	1.1;

1.1
date	2006.03.21.09.05.42;	author ru;	state Exp;
branches;
next	;

1.14.2.1
date	2012.11.17.01.53.38;	author svnexp;	state dead;
branches;
next	1.14.2.2;

1.14.2.2
date	2013.03.28.13.05.46;	author svnexp;	state Exp;
branches;
next	;

1.12.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.12.2.1.2.1;
next	1.12.2.2;

1.12.2.2
date	2012.06.02.02.26.37;	author gjb;	state Exp;
branches
	1.12.2.2.2.1;
next	1.12.2.3;

1.12.2.3
date	2012.11.17.11.37.28;	author svnexp;	state Exp;
branches;
next	1.12.2.4;

1.12.2.4
date	2013.07.05.18.01.45;	author svnexp;	state Exp;
branches;
next	1.12.2.5;

1.12.2.5
date	2014.03.12.00.01.45;	author svnexp;	state Exp;
branches;
next	;

1.12.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.12.2.1.2.2;

1.12.2.1.2.2
date	2012.11.17.08.37.24;	author svnexp;	state Exp;
branches;
next	;

1.12.2.2.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.12.2.2.2.2;

1.12.2.2.2.2
date	2012.11.17.08.48.15;	author svnexp;	state Exp;
branches;
next	;

1.9.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.9.2.1.2.1
	1.9.2.1.4.1
	1.9.2.1.6.1
	1.9.2.1.8.1;
next	1.9.2.2;

1.9.2.2
date	2012.06.02.02.26.49;	author gjb;	state Exp;
branches;
next	1.9.2.3;

1.9.2.3
date	2012.11.17.10.37.09;	author svnexp;	state Exp;
branches;
next	;

1.9.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.9.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.9.2.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.9.2.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.9.2.1.8.2;

1.9.2.1.8.2
date	2012.11.17.08.25.43;	author svnexp;	state Exp;
branches;
next	;

1.6.2.1
date	2007.11.10.11.32.37;	author danger;	state Exp;
branches
	1.6.2.1.2.1;
next	1.6.2.2;

1.6.2.2
date	2008.01.28.08.42.15;	author dougb;	state Exp;
branches
	1.6.2.2.2.1
	1.6.2.2.4.1
	1.6.2.2.6.1
	1.6.2.2.8.1;
next	1.6.2.3;

1.6.2.3
date	2012.06.02.02.27.01;	author gjb;	state Exp;
branches;
next	1.6.2.4;

1.6.2.4
date	2012.11.17.08.07.52;	author svnexp;	state Exp;
branches;
next	;

1.6.2.1.2.1
date	2008.01.28.08.57.11;	author dougb;	state Exp;
branches;
next	;

1.6.2.2.2.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.6.2.2.4.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.6.2.2.6.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.6.2.2.8.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.6.2.2.8.2;

1.6.2.2.8.2
date	2012.11.17.08.17.37;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.17
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/253304
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@#!/bin/sh
#
# This file is in the public domain.

set -o errexit
LC_ALL=C

ident='$FreeBSD: head/tools/build/options/makeman 253304 2013-07-12 23:08:44Z bapt $'

t=$(mktemp -d -t makeman)
trap 'test -d $t && rm -rf $t' exit

#
# 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 -C ../../.. targets | tail -n +2))
	rm -f $t/settings
	for target in ${ALL_TARGETS} ; do
		make -C ../../.. 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' >&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 -C ../../.. "$@@" 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' >&2
			exit 1
			;;
		esac
	done
}

main()
{

	ident=${ident#$}
	ident=${ident% $}
	fbsdid='$'FreeBSD'$'
	cat <<EOF
.\" DO NOT EDIT-- this file is automatically generated.
.\" from ${ident}
.\" ${fbsdid}
.Dd $(echo $(LC_TIME=C date +'%B %e, %Y'))
.Dt SRC.CONF 5
.Os
.Sh NAME
.Nm src.conf
.Nd "source build options"
.Sh DESCRIPTION
The
.Nm
file contains settings that will apply to every build involving the
.Fx
source tree; see
.Xr build 7 .
.Pp
The
.Nm
file uses the standard makefile syntax.
However,
.Nm
should not specify any dependencies to
.Xr make 1 .
Instead,
.Nm
is to set
.Xr make 1
variables that control the aspects of how the system builds.
.Pp
The default location of
.Nm
is
.Pa /etc/src.conf ,
though an alternative location can be specified in the
.Xr make 1
variable
.Va SRCCONF .
Overriding the location of
.Nm
may be necessary if the system-wide settings are not suitable
for a particular build.
For instance, setting
.Va SRCCONF
to
.Pa /dev/null
effectively resets all build controls to their defaults.
.Pp
The only purpose of
.Nm
is to control the compilation of the
.Fx
source code, which is usually located in
.Pa /usr/src .
As a rule, the system administrator creates
.Nm
when the values of certain control variables need to be changed
from their defaults.
.Pp
In addition, control variables can be specified
for a particular build via the
.Fl D
option of
.Xr make 1
or in its environment; see
.Xr environ 7 .
.Pp
The values of variables are ignored regardless of their setting;
even if they would be set to
.Dq Li FALSE
or
.Dq Li NO .
Just the existence of an option will cause
it to be honoured by
.Xr make 1 .
.Pp
The following list provides a name and short description for variables
that can be used for source builds.
.Bl -tag -width indent
EOF
	show settings SRCCONF=/dev/null | sort > $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 <<EOF
.El
.Sh FILES
.Bl -tag -compact -width Pa
.It Pa /etc/src.conf
.It Pa /usr/share/mk/bsd.own.mk
.El
.Sh SEE ALSO
.Xr make 1 ,
.Xr make.conf 5 ,
.Xr build 7 ,
.Xr ports 7
.Sh HISTORY
The
.Nm
file appeared in
.Fx 7.0 .
.Sh AUTHORS
This manual page was autogenerated.
EOF
}

twiddle_pos=0
twiddle()
{
	local c0='|' c1='/' c2='-' c3='\'

	eval printf '%c\\b' '$c'${twiddle_pos}
	twiddle_pos=$(((twiddle_pos+1)%4))
}

main
@


1.16
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251685
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d6 1
d8 1
a8 1
ident='$FreeBSD: head/tools/build/options/makeman 251685 2013-06-13 13:05:08Z emaste $'
@


1.15
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251601
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d7 1
a7 1
ident='$FreeBSD: head/tools/build/options/makeman 251601 2013-06-10 13:55:03Z emaste $'
d243 1
a243 1
		if [ "$(cat $t/deps2)" == WITHOUT_BIND_UTILS ]; then
@


1.14
log
@Switching exporter and resync
@
text
@d7 1
a7 1
ident='$FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb $'
d201 6
a206 1
	show with SRCCONF=/dev/null | sort > $t/config_WITH_ALL
d237 12
a259 4
		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

@


1.14.2.1
log
@file makeman was added on branch RELENG_8_4 on 2013-03-28 13:05:46 +0000
@
text
@d1 296
@


1.14.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 201
#!/bin/sh
#
# This file is in the public domain.

ident='$FreeBSD: releng/8.4/tools/build/options/makeman 236431 2012-06-02 02:26:49Z gjb $'

#
# usage: show { settings | options } ...
#
show()
{

	mode=$1; shift
	case ${mode} in
	settings)
		yes_prefix=WITH
		no_prefix=WITHOUT
		;;
	options)
		yes_prefix=WITHOUT
		no_prefix=WITH
		;;
	*)
		echo "internal error" >/dev/stderr
		exit 1
		;;
	esac
	(
		cd ../../..
		make "$@@" showconfig SRCCONF=/dev/null __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" >/dev/stderr
			exit 1
			;;
		esac
	done
}

main()
{

	trap 'rm -f _defcfg _config _config2 _deps _deps2' exit
	ident=${ident#$}
	ident=${ident% $}
	fbsdid='$'FreeBSD'$'
	cat <<EOF
.\" DO NOT EDIT-- this file is automatically generated.
.\" from ${ident}
.\" ${fbsdid}
.Dd $(LC_TIME=C date +'%B %e, %Y')
.Dt SRC.CONF 5
.Os
.Sh NAME
.Nm src.conf
.Nd "source build options"
.Sh DESCRIPTION
The
.Nm
file contains settings that will apply to every build involving the
.Fx
source tree; see
.Xr build 7 .
.Pp
The
.Nm
file uses the standard makefile syntax.
However,
.Nm
should not specify any dependencies to
.Xr make 1 .
Instead,
.Nm
is to set
.Xr make 1
variables that control the aspects of how the system builds.
.Pp
The default location of
.Nm
is
.Pa /etc/src.conf ,
though an alternative location can be specified in the
.Xr make 1
variable
.Va SRCCONF .
Overriding the location of
.Nm
may be necessary if the system-wide settings are not suitable
for a particular build.
For instance, setting
.Va SRCCONF
to
.Pa /dev/null
effectively resets all build controls to their defaults.
.Pp
The only purpose of
.Nm
is to control the compilation of the
.Fx
source code, which is usually located in
.Pa /usr/src .
As a rule, the system administrator creates
.Nm
when the values of certain control variables need to be changed
from their defaults.
.Pp
In addition, control variables can be specified
for a particular build via the
.Fl D
option of
.Xr make 1
or in its environment; see
.Xr environ 7 .
.Pp
The values of variables are ignored regardless of their setting;
even if they would be set to
.Dq Li FALSE
or
.Dq Li NO .
Just the existence of an option will cause
it to be honoured by
.Xr make 1 .
.Pp
The following list provides a name and short description for variables
that can be used for source builds.
.Bl -tag -width indent
EOF
	show settings |sort >_defcfg
	show options |
	while read opt; do
		if [ -f ${opt} ]; then
			cat <<EOF
.It Va ${opt}
EOF
			sed -e's/\$\(FreeBSD: .*\) \$/from \1/' ${opt}
		else
			echo "no description found for ${opt}, skipping" >/dev/stderr
			continue
		fi
		show settings -D${opt} |sort >_config
		comm -13 _defcfg _config |grep -v "^${opt}$" >_deps
		if [ -s _deps ]; then
			cat <<EOF
When set, it also enforces the following options:
.Pp
.Bl -item -compact
EOF
			cat _deps |while read opt2; do
				cat <<EOF
.It
.Va ${opt2}
EOF
				show settings -D${opt} $(
				    echo ${opt2} |
				    sed -e's/^WITHOUT_/-DWITH_/' -e's/^WITH_/-DWITHOUT_/'
				) |sort >_config2
				comm -13 _config _config2 >_deps2
				if [ -s _deps2 ]; then
					cat <<EOF
(can be overridden with
.Va $(cat _deps2) )
EOF
				fi
			done
				cat <<EOF
.El
EOF
		fi
	done
	cat <<EOF
.El
.Sh FILES
.Bl -tag -compact -width Pa
.It Pa /etc/src.conf
.It Pa /usr/share/mk/bsd.own.mk
.El
.Sh SEE ALSO
.Xr make 1 ,
.Xr make.conf 5 ,
.Xr build 7 ,
.Xr ports 7
.Sh HISTORY
The
.Nm
file appeared in
.Fx 7.0 .
.Sh AUTHORS
This manual page was autogenerated.
EOF
}

main
@


1.13
log
@SVN rev 236279 on 2012-05-30 02:37:20Z by gjb

Add '-width Pa' to src.conf.5 for mdoc(7) style consistency.

MFC after:	3 days
@
text
@d7 1
a7 1
ident='$FreeBSD$'
@


1.12
log
@SVN rev 221733 on 2011-05-10 13:01:11Z by ru

Reassurance for impatient.
@
text
@d268 1
a268 1
.Bl -tag -compact
@


1.12.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.12.2.2
log
@SVN rev 236430 on 2012-06-02 02:26:37Z by gjb

MFC r236274, r236278, r236279:

r236274:
 - Fix an mdoc(7) formatting nit.

r236278:
 - Fix mdoc(7) style nits.

r236279:
 - Add '-width Pa' to src.conf.5 for mdoc(7) style consistency.
@
text
@d268 1
a268 1
.Bl -tag -compact -width Pa
@


1.12.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d7 1
a7 1
ident='$FreeBSD: stable/9/tools/build/options/makeman 236430 2012-06-02 02:26:37Z gjb $'
@


1.12.2.4
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/252812
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d7 1
a7 1
ident='$FreeBSD: stable/9/tools/build/options/makeman 252812 2013-07-05 17:57:25Z emaste $'
d201 1
a201 6
	# 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
a231 12
		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

d243 4
@


1.12.2.5
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/263058
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a5 1
LC_ALL=C
d7 1
a7 1
ident='$FreeBSD: stable/9/tools/build/options/makeman 263058 2014-03-11 23:04:32Z gjb $'
a11 3
srcdir=$(realpath ../../..)
make="make -C $srcdir -m $srcdir/share/mk"

d29 1
a29 1
	ALL_TARGETS=$(echo $(${make} targets | tail -n +2))
d32 1
a32 1
		${make} showconfig \
d95 1
a95 1
	${make} "$@@" showconfig __MAKE_CONF=/dev/null |
@


1.12.2.2.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.12.2.2.2.2
log
@Switch importer
@
text
@d7 1
a7 1
ident='$FreeBSD: releng/9.1/tools/build/options/makeman 236430 2012-06-02 02:26:37Z gjb $'
@


1.12.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.12.2.1.2.2
log
@Switch importer
@
text
@d7 1
a7 1
ident='$FreeBSD: releng/9.0/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru $'
@


1.11
log
@SVN rev 221732 on 2011-05-10 12:57:39Z by ru

Style.
@
text
@d263 1
d287 9
@


1.10
log
@SVN rev 221730 on 2011-05-10 11:14:40Z by ru

- There now exist options that have different defaults depending on
  the architecture, reflect this in documentation.  For such
  options, both WITH_FOO and WITHOUT_FOO description files should
  be provided.

  Prodded by:	des

- Setting a build option may enforce other build options, try harder
  to detect this case.

- Setting a build option may change other option's default value,
  try harder to detect this case.
@
text
@a208 8
		else
			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
d211 9
a219 1
		if [ "${opt%%_*}" = "WITHOUT" ] ; then
d223 1
a223 1
		elif [ "${opt%%_*}" = "WITH" ] ; then
@


1.9
log
@SVN rev 188848 on 2009-02-20 11:09:55Z by mtm

Doh! r188813 modified an auto-generated file. Fix it for real:
  o grammar fix
  o remove mention of libkse

Submitted by:	Niclas Zeising <niclas.zeising@@gmail.com>
@
text
@d5 2
d9 3
d13 59
a71 1
# usage: show { settings | options } ...
d76 1
a76 1
	mode=$1; shift
d82 5
a86 1
	options)
d88 1
a88 1
		no_prefix=WITH
d91 1
a91 1
		echo "internal error" >/dev/stderr
d95 2
a96 5
	(
		cd ../../..
		make "$@@" showconfig SRCCONF=/dev/null __MAKE_CONF=/dev/null
	) |
	while read var _ val; do
d106 1
a106 1
			echo "make showconfig broken" >/dev/stderr
a115 1
	trap 'rm -f _defcfg _config _config2 _deps _deps2' exit
d123 1
a123 1
.Dd $(LC_TIME=C date +'%B %e, %Y')
d200 11
a210 7
	show settings |sort >_defcfg
	show options |
	while read opt; do
		if [ -f ${opt} ]; then
			cat <<EOF
.It Va ${opt}
EOF
d212 15
d228 13
a240 2
			echo "no description found for ${opt}, skipping" >/dev/stderr
			continue
d242 18
a259 24
		show settings -D${opt} |sort >_config
		comm -13 _defcfg _config |grep -v "^${opt}$" >_deps
		if [ -s _deps ]; then
			cat <<EOF
When set, it also enforces the following options:
.Pp
.Bl -item -compact
EOF
			cat _deps |while read opt2; do
				cat <<EOF
.It
.Va ${opt2}
EOF
				show settings -D${opt} $(
				    echo ${opt2} |
				    sed -e's/^WITHOUT_/-DWITH_/' -e's/^WITH_/-DWITHOUT_/'
				) |sort >_config2
				comm -13 _config _config2 >_deps2
				if [ -s _deps2 ]; then
					cat <<EOF
(can be overridden with
.Va $(cat _deps2) )
EOF
				fi
d261 1
a261 3
				cat <<EOF
.El
EOF
@


1.9.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.9.2.2
log
@SVN rev 236431 on 2012-06-02 02:26:49Z by gjb

MFC r236274, r236278, r236279:

r236274:
 - Fix an mdoc(7) formatting nit.

r236278:
 - Fix mdoc(7) style nits.

r236279:
 - Add '-width Pa' to src.conf.5 for mdoc(7) style consistency.
@
text
@d182 1
a182 1
.Bl -tag -compact -width Pa
@


1.9.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d5 1
a5 1
ident='$FreeBSD: stable/8/tools/build/options/makeman 236431 2012-06-02 02:26:49Z gjb $'
@


1.9.2.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.9.2.1.8.2
log
@Switch importer
@
text
@d5 1
a5 1
ident='$FreeBSD: releng/8.3/tools/build/options/makeman 188848 2009-02-20 11:09:55Z mtm $'
@


1.9.2.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.9.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.9.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.8
log
@- Fix setting of MK_GSSAPI option by bsd.own.mk; its value should
  default to the value of MK_KERBEROS unless set explicitly by
  WITH_GSSAPI/WITHOUT_GSSAPI.  (This introduces another type of
  MK_* variables which itself is questionable.)

- Teach tools/build/options/makeman script that generates the
  src.conf(5) manpage about the new type of MK_* variables.

- Fix broken logic in lib/Makefile.
@
text
@d121 1
a121 1
or in environment; see
@


1.7
log
@s/maybe/may be/

MFC after: 3 days
@
text
@d52 1
a52 1
	trap 'rm -f _config _config2 _deps' exit
d137 1
a137 1
	show settings |sort >_config
d149 2
a150 2
		show settings -D${opt} |sort >_config2
		comm -13 _config _config2 |grep -v "^${opt}$" >_deps
d162 11
@


1.6
log
@- Utilize the "showconfig" top-level target.
- Pass __MAKE_CONF=/dev/null to get a pristine output.
@
text
@d97 1
a97 1
maybe necessary if the system-wide settings are not suitable
@


1.6.2.1
log
@s/maybe/may be/

Approved by: re (bmah@@)
@
text
@d97 1
a97 1
may be necessary if the system-wide settings are not suitable
@


1.6.2.1.2.1
log
@MFC the WITHOUT_GSSAPI knob.

Approved by:	re (kensmith)
@
text
@d52 1
a52 1
	trap 'rm -f _defcfg _config _config2 _deps _deps2' exit
d137 1
a137 1
	show settings |sort >_defcfg
d149 2
a150 2
		show settings -D${opt} |sort >_config
		comm -13 _defcfg _config |grep -v "^${opt}$" >_deps
a161 11
				show settings -D${opt} $(
				    echo ${opt2} |
				    sed -e's/^WITHOUT_/-DWITH_/' -e's/^WITH_/-DWITHOUT_/'
				) |sort >_config2
				comm -13 _config _config2 >_deps2
				if [ -s _deps2 ]; then
					cat <<EOF
(can be overridden with
.Va $(cat _deps2) )
EOF
				fi
@


1.6.2.2
log
@MFC the WITHOUT_GSSAPI knob.
@
text
@d52 1
a52 1
	trap 'rm -f _defcfg _config _config2 _deps _deps2' exit
d137 1
a137 1
	show settings |sort >_defcfg
d149 2
a150 2
		show settings -D${opt} |sort >_config
		comm -13 _defcfg _config |grep -v "^${opt}$" >_deps
a161 11
				show settings -D${opt} $(
				    echo ${opt2} |
				    sed -e's/^WITHOUT_/-DWITH_/' -e's/^WITH_/-DWITHOUT_/'
				) |sort >_config2
				comm -13 _config _config2 >_deps2
				if [ -s _deps2 ]; then
					cat <<EOF
(can be overridden with
.Va $(cat _deps2) )
EOF
				fi
@


1.6.2.3
log
@SVN rev 236432 on 2012-06-02 02:27:01Z by gjb

MFC r236274, r236278, r236279:

r236274:
 - Fix an mdoc(7) formatting nit.

r236278:
 - Fix mdoc(7) style nits.

r236279:
 - Add '-width Pa' to src.conf.5 for mdoc(7) style consistency.
@
text
@d182 1
a182 1
.Bl -tag -compact -width Pa
@


1.6.2.4
log
@Switch importer
@
text
@d5 1
a5 1
ident='$FreeBSD: stable/7/tools/build/options/makeman 236432 2012-06-02 02:27:01Z gjb $'
@


1.6.2.2.8.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.6.2.2.8.2
log
@Switch importer
@
text
@d5 1
a5 1
ident='$FreeBSD: releng/7.4/tools/build/options/makeman 175743 2008-01-28 08:42:15Z dougb $'
@


1.6.2.2.6.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.6.2.2.4.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.6.2.2.2.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.5
log
@Actually skip over undocumented options with "continue"
to avoid artifacts in the manpage generated.  Previously
an orphaned paragraph on dependencies of such an option
would appear.
@
text
@d8 1
a8 1
# show settings | options
d28 4
a31 2
	make "$@@" -f ../../../share/mk/bsd.own.mk SRCCONF=/dev/null -V_ -dg1 |
	grep ^MK_ |sort |
@


1.4
log
@Switch value back to values.

Requested by:	ru
@
text
@d145 1
@


1.3
log
@Some minor wording/description changes.

Reviewed by:	ru (two months ago)
@
text
@d122 1
a122 1
The value of variables are ignored regardless of their setting;
@


1.2
log
@Fix generation of '$FreeBSD$'.
@
text
@d63 1
a63 1
.Nd source build options
d107 1
a107 1
sources, which are usually found in
d122 2
a123 2
The values of variables are ignored; the variable being
set at all (even to
d126 4
a129 2
.Dq Li NO )
causes it to be treated as if it was set with no value.
@


1.1
log
@A tool to generate the src.conf(5) manpage.
@
text
@d53 1
a53 1
	fbsdid='$FreeBSD$'
@

