xref: /freebsd/tools/build/options/makeman (revision 65fd76b5f566a21d4e017711e8d0678aab6fe59e)
1c5922fbfSRuslan Ermilov#!/bin/sh
2c5922fbfSRuslan Ermilov#
3c5922fbfSRuslan Ermilov# This file is in the public domain.
49dc5d76eSEd Maste#
50af1da97SEd Maste# This script creates the src.conf.5 man page using template text contained
60af1da97SEd Maste# herein and the contents of the WITH_* and WITHOUT_* files in the same
70af1da97SEd Maste# directory. Each WITH_* and WITHOUT_* file documents the effect of the
89dc5d76eSEd Maste# /etc/src.conf knob with the same name.
99dc5d76eSEd Maste#
100af1da97SEd Maste# For each supported architecture, "make showconfig" is invoked to determine
110af1da97SEd Maste# the default setting of every option: always WITH_, always WITHOUT_, or
120af1da97SEd Maste# architecture-dependent WITH_/WITHOUT_.  It also determines and describes
130af1da97SEd Maste# dependencies between options.
149dc5d76eSEd Maste#
159dc5d76eSEd Maste# Usage:
169dc5d76eSEd Maste#
179dc5d76eSEd Maste#     cd tools/build/options
189dc5d76eSEd Maste#     sh makeman > ../../../share/man/man5/src.conf.5
19c5922fbfSRuslan Ermilov
202701a1b7SRuslan Ermilovset -o errexit
21f1f871e1SHajimu UMEMOTOexport LC_ALL=C
222701a1b7SRuslan Ermilov
232701a1b7SRuslan Ermilovt=$(mktemp -d -t makeman)
244af17bf5SWarren Blocktrap 'test -d $t && rm -rf $t' exit
252701a1b7SRuslan Ermilov
2669c469c9SDag-Erling Smørgravsrcdir=$(realpath ../../..)
2769c469c9SDag-Erling Smørgravmake="make -C $srcdir -m $srcdir/share/mk"
2869c469c9SDag-Erling Smørgrav
29c5922fbfSRuslan Ermilov#
302701a1b7SRuslan Ermilov# usage: no_targets all_targets yes_targets
312701a1b7SRuslan Ermilov#
322701a1b7SRuslan Ermilovno_targets()
332701a1b7SRuslan Ermilov{
342701a1b7SRuslan Ermilov	for t1 in $1 ; do
352701a1b7SRuslan Ermilov		for t2 in $2 ; do
362701a1b7SRuslan Ermilov			if [ "${t1}" = "${t2}" ] ; then
372701a1b7SRuslan Ermilov				continue 2
382701a1b7SRuslan Ermilov			fi
392701a1b7SRuslan Ermilov		done
402701a1b7SRuslan Ermilov		echo ${t1}
412701a1b7SRuslan Ermilov	done
422701a1b7SRuslan Ermilov}
432701a1b7SRuslan Ermilov
442701a1b7SRuslan Ermilovshow_options()
452701a1b7SRuslan Ermilov{
46177d707cSBryan Drewery	ALL_TARGETS=$(echo $(${make} targets MK_AUTO_OBJ=no | tail -n +2))
472701a1b7SRuslan Ermilov	rm -f $t/settings
482701a1b7SRuslan Ermilov	for target in ${ALL_TARGETS} ; do
49b7f38e69SEd Maste		prev_opt=
503dfad7c7SBryan Drewery		env -i ${make} showconfig \
51317c99b7SBryan Drewery		    SRC_ENV_CONF=/dev/null SRCCONF=/dev/null \
52317c99b7SBryan Drewery		    __MAKE_CONF=/dev/null \
532701a1b7SRuslan Ermilov		    TARGET_ARCH=${target#*/} TARGET=${target%/*} |
542701a1b7SRuslan Ermilov		while read var _ val ; do
55897ae85fSBrooks Davis			case $var in
56897ae85fSBrooks Davis			MK_*)
572701a1b7SRuslan Ermilov				opt=${var#MK_}
58b7f38e69SEd Maste				if [ $opt = "$prev_opt" ]; then
59b7f38e69SEd Maste					echo "$target: ignoring duplicate option $opt" >&2
60b7f38e69SEd Maste					continue
61b7f38e69SEd Maste				fi
62b7f38e69SEd Maste				prev_opt=$opt
632701a1b7SRuslan Ermilov				case ${val} in
642701a1b7SRuslan Ermilov				yes)
652701a1b7SRuslan Ermilov					echo ${opt} ${target}
662701a1b7SRuslan Ermilov					;;
672701a1b7SRuslan Ermilov				no)
682701a1b7SRuslan Ermilov					echo ${opt}
692701a1b7SRuslan Ermilov					;;
702701a1b7SRuslan Ermilov				*)
71cc2520d2SSimon J. Gerraty					echo "make showconfig broken: ${var} ${_} ${val} (not yes or no)" >&2
722701a1b7SRuslan Ermilov					exit 1
732701a1b7SRuslan Ermilov					;;
742701a1b7SRuslan Ermilov				esac
75897ae85fSBrooks Davis				;;
76897ae85fSBrooks Davis			OPT_*)
77897ae85fSBrooks Davis				# ignore
78897ae85fSBrooks Davis				;;
79897ae85fSBrooks Davis			*)
80897ae85fSBrooks Davis				echo "make showconfig broken: ${var} ${_} ${val} not MK_ or OPT_" >&2
81897ae85fSBrooks Davis				exit 1
82897ae85fSBrooks Davis				;;
83897ae85fSBrooks Davis			esac
842701a1b7SRuslan Ermilov		done > $t/settings.target
852701a1b7SRuslan Ermilov		if [ -r $t/settings ] ; then
862701a1b7SRuslan Ermilov			join -t\  $t/settings $t/settings.target > $t/settings.new
872701a1b7SRuslan Ermilov			mv $t/settings.new $t/settings
882701a1b7SRuslan Ermilov		else
892701a1b7SRuslan Ermilov			mv $t/settings.target $t/settings
902701a1b7SRuslan Ermilov		fi
912701a1b7SRuslan Ermilov	done
922701a1b7SRuslan Ermilov
934078537cSBryan Drewery	while read opt targets ; do
942701a1b7SRuslan Ermilov		if [ "${targets}" = "${ALL_TARGETS}" ] ; then
952701a1b7SRuslan Ermilov			echo "WITHOUT_${opt}"
962701a1b7SRuslan Ermilov		elif [ -z "${targets}" ] ; then
972701a1b7SRuslan Ermilov			echo "WITH_${opt}"
982701a1b7SRuslan Ermilov		else
992701a1b7SRuslan Ermilov			echo "WITHOUT_${opt}" $(no_targets "${ALL_TARGETS}" "${targets}")
1002701a1b7SRuslan Ermilov			echo "WITH_${opt} ${targets}"
1012701a1b7SRuslan Ermilov		fi
1024078537cSBryan Drewery	done < $t/settings
1032701a1b7SRuslan Ermilov}
1042701a1b7SRuslan Ermilov
1052701a1b7SRuslan Ermilov#
1062701a1b7SRuslan Ermilov# usage: show { settings | with | without } ...
107c5922fbfSRuslan Ermilov#
108c5922fbfSRuslan Ermilovshow()
109c5922fbfSRuslan Ermilov{
110c5922fbfSRuslan Ermilov
111c5922fbfSRuslan Ermilov	mode=$1 ; shift
112c5922fbfSRuslan Ermilov	case ${mode} in
113c5922fbfSRuslan Ermilov	settings)
114c5922fbfSRuslan Ermilov		yes_prefix=WITH
115c5922fbfSRuslan Ermilov		no_prefix=WITHOUT
116c5922fbfSRuslan Ermilov		;;
1172701a1b7SRuslan Ermilov	with)
1182701a1b7SRuslan Ermilov		yes_prefix=WITH
119c5922fbfSRuslan Ermilov		no_prefix=WITH
120c5922fbfSRuslan Ermilov		;;
1212701a1b7SRuslan Ermilov	without)
1222701a1b7SRuslan Ermilov		yes_prefix=WITHOUT
1232701a1b7SRuslan Ermilov		no_prefix=WITHOUT
1242701a1b7SRuslan Ermilov		;;
125c5922fbfSRuslan Ermilov	*)
1262701a1b7SRuslan Ermilov		echo 'internal error' >&2
127c5922fbfSRuslan Ermilov		exit 1
128c5922fbfSRuslan Ermilov		;;
129c5922fbfSRuslan Ermilov	esac
1309c80d66eSJohn Baldwin	requireds=`env -i ${make} -f ${srcdir}/share/mk/src.opts.mk \
131bce99679SColin Percival	    -V '${__REQUIRED_OPTIONS:ts,}'`
1323dfad7c7SBryan Drewery	env -i ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \
133317c99b7SBryan Drewery	    SRCCONF=/dev/null |
134c5922fbfSRuslan Ermilov	while read var _ val ; do
135897ae85fSBrooks Davis		case ${var} in
136897ae85fSBrooks Davis		MK_*)
137c5922fbfSRuslan Ermilov			opt=${var#MK_}
138bce99679SColin Percival			case ,${requireds}, in
139bce99679SColin Percival			*,${opt},*)
140bce99679SColin Percival				continue
141bce99679SColin Percival				;;
142bce99679SColin Percival			esac
143c5922fbfSRuslan Ermilov			case ${val} in
144c5922fbfSRuslan Ermilov			yes)
145c5922fbfSRuslan Ermilov				echo ${yes_prefix}_${opt}
146c5922fbfSRuslan Ermilov				;;
147c5922fbfSRuslan Ermilov			no)
148c5922fbfSRuslan Ermilov				echo ${no_prefix}_${opt}
149c5922fbfSRuslan Ermilov				;;
150c5922fbfSRuslan Ermilov			*)
151cc2520d2SSimon J. Gerraty				echo "make showconfig broken: ${var} ${_} ${val} (not yes or no)" >&2
152c5922fbfSRuslan Ermilov				exit 1
153c5922fbfSRuslan Ermilov				;;
154c5922fbfSRuslan Ermilov			esac
155897ae85fSBrooks Davis			;;
156897ae85fSBrooks Davis		OPT_*)
157897ae85fSBrooks Davis			# ignore
158897ae85fSBrooks Davis			;;
159897ae85fSBrooks Davis		*)
160897ae85fSBrooks Davis			echo "make showconfig broken: ${var} ${_} ${val} not MK_ or OPT_" >&2
161897ae85fSBrooks Davis			exit 1
162897ae85fSBrooks Davis			;;
163897ae85fSBrooks Davis		esac
164897ae85fSBrooks Davis	done
165897ae85fSBrooks Davis}
166897ae85fSBrooks Davis
167897ae85fSBrooks Davisshow_group_options()
168897ae85fSBrooks Davis{
169897ae85fSBrooks Davis	env -i ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \
170897ae85fSBrooks Davis	    SRCCONF=/dev/null |
171897ae85fSBrooks Davis	while read var _ val ; do
172897ae85fSBrooks Davis		case ${var} in
173897ae85fSBrooks Davis		MK_*)
174897ae85fSBrooks Davis			# ignore
175897ae85fSBrooks Davis			;;
176897ae85fSBrooks Davis		OPT_*)
177897ae85fSBrooks Davis			opt=${var#OPT_}
178897ae85fSBrooks Davis			echo ${opt}
179897ae85fSBrooks Davis			;;
180897ae85fSBrooks Davis		*)
181897ae85fSBrooks Davis			echo "make showconfig broken: ${var} ${_} ${val} not MK_ or OPT_" >&2
182897ae85fSBrooks Davis			exit 1
183897ae85fSBrooks Davis			;;
184897ae85fSBrooks Davis		esac
185c5922fbfSRuslan Ermilov	done
186c5922fbfSRuslan Ermilov}
187c5922fbfSRuslan Ermilov
188c5922fbfSRuslan Ermilovmain()
189c5922fbfSRuslan Ermilov{
1907a206c31SWarren Block	echo "building src.conf.5 man page from files in ${PWD}" >&2
191c5922fbfSRuslan Ermilov
1920db9a543SEitan Adler	generated='@'generated
193c5922fbfSRuslan Ermilov	cat <<EOF
194b1a0e564SEitan Adler.\" DO NOT EDIT-- this file is $generated by tools/build/options/makeman.
1952701a1b7SRuslan Ermilov.Dd $(echo $(LC_TIME=C date +'%B %e, %Y'))
196c5922fbfSRuslan Ermilov.Dt SRC.CONF 5
197c5922fbfSRuslan Ermilov.Os
198c5922fbfSRuslan Ermilov.Sh NAME
199c5922fbfSRuslan Ermilov.Nm src.conf
20057caf3d6STom Rhodes.Nd "source build options"
201c5922fbfSRuslan Ermilov.Sh DESCRIPTION
202c5922fbfSRuslan ErmilovThe
203c5922fbfSRuslan Ermilov.Nm
204e6ca6901SGordon Berglingfile contains variables that control what components will be generated during
205e6ca6901SGordon Berglingthe build process of the
206c5922fbfSRuslan Ermilov.Fx
207c5922fbfSRuslan Ermilovsource tree; see
208c5922fbfSRuslan Ermilov.Xr build 7 .
209c5922fbfSRuslan Ermilov.Pp
210c5922fbfSRuslan ErmilovThe
211c5922fbfSRuslan Ermilov.Nm
212c5922fbfSRuslan Ermilovfile uses the standard makefile syntax.
213c5922fbfSRuslan ErmilovHowever,
214c5922fbfSRuslan Ermilov.Nm
215c5922fbfSRuslan Ermilovshould not specify any dependencies to
216c5922fbfSRuslan Ermilov.Xr make 1 .
217c5922fbfSRuslan ErmilovInstead,
218c5922fbfSRuslan Ermilov.Nm
219c5922fbfSRuslan Ermilovis to set
220c5922fbfSRuslan Ermilov.Xr make 1
221c5922fbfSRuslan Ermilovvariables that control the aspects of how the system builds.
222c5922fbfSRuslan Ermilov.Pp
223c5922fbfSRuslan ErmilovThe default location of
224c5922fbfSRuslan Ermilov.Nm
225c5922fbfSRuslan Ermilovis
226c5922fbfSRuslan Ermilov.Pa /etc/src.conf ,
227c5922fbfSRuslan Ermilovthough an alternative location can be specified in the
228c5922fbfSRuslan Ermilov.Xr make 1
229c5922fbfSRuslan Ermilovvariable
230c5922fbfSRuslan Ermilov.Va SRCCONF .
231c5922fbfSRuslan ErmilovOverriding the location of
232c5922fbfSRuslan Ermilov.Nm
233c5922fbfSRuslan Ermilovmay be necessary if the system-wide settings are not suitable
234c5922fbfSRuslan Ermilovfor a particular build.
235c5922fbfSRuslan ErmilovFor instance, setting
236c5922fbfSRuslan Ermilov.Va SRCCONF
237c5922fbfSRuslan Ermilovto
238c5922fbfSRuslan Ermilov.Pa /dev/null
239c5922fbfSRuslan Ermiloveffectively resets all build controls to their defaults.
240c5922fbfSRuslan Ermilov.Pp
241c5922fbfSRuslan ErmilovThe only purpose of
242c5922fbfSRuslan Ermilov.Nm
243c5922fbfSRuslan Ermilovis to control the compilation of the
244c5922fbfSRuslan Ermilov.Fx
24557caf3d6STom Rhodessource code, which is usually located in
246c5922fbfSRuslan Ermilov.Pa /usr/src .
247c5922fbfSRuslan ErmilovAs a rule, the system administrator creates
248c5922fbfSRuslan Ermilov.Nm
249c5922fbfSRuslan Ermilovwhen the values of certain control variables need to be changed
250c5922fbfSRuslan Ermilovfrom their defaults.
251c5922fbfSRuslan Ermilov.Pp
252c5922fbfSRuslan ErmilovIn addition, control variables can be specified
253c5922fbfSRuslan Ermilovfor a particular build via the
254c5922fbfSRuslan Ermilov.Fl D
255c5922fbfSRuslan Ermilovoption of
256c5922fbfSRuslan Ermilov.Xr make 1
2573d919b75SMike Makonnenor in its environment; see
258c5922fbfSRuslan Ermilov.Xr environ 7 .
259c5922fbfSRuslan Ermilov.Pp
260ca045714SBryan DreweryThe environment of
261ca045714SBryan Drewery.Xr make 1
262ca045714SBryan Dreweryfor the build can be controlled via the
263ca045714SBryan Drewery.Va SRC_ENV_CONF
264ca045714SBryan Dreweryvariable, which defaults to
265ca045714SBryan Drewery.Pa /etc/src-env.conf .
266ca045714SBryan DrewerySome examples that may only be set in this file are
26732b5dc9aSSimon J. Gerraty.Va WITH_DIRDEPS_BUILD ,
268ca045714SBryan Dreweryand
269dfa09989SBryan Drewery.Va WITH_META_MODE ,
270dfa09989SBryan Dreweryand
2715d111a97SBryan Drewery.Va MAKEOBJDIRPREFIX
272dfa09989SBryan Dreweryas they are environment-only variables.
273ca045714SBryan Drewery.Pp
27489aed883SBrooks DavisThe values of
27589aed883SBrooks Davis.Va WITH_
27689aed883SBrooks Davisand
27789aed883SBrooks Davis.Va WITHOUT_
27889aed883SBrooks Davisvariables are ignored regardless of their setting;
27957caf3d6STom Rhodeseven if they would be set to
280c5922fbfSRuslan Ermilov.Dq Li FALSE
281c5922fbfSRuslan Ermilovor
28257caf3d6STom Rhodes.Dq Li NO .
2837a206c31SWarren BlockThe presence of an option causes
2847a206c31SWarren Blockit to be honored by
28557caf3d6STom Rhodes.Xr make 1 .
286c5922fbfSRuslan Ermilov.Pp
2877a206c31SWarren BlockThis list provides a name and short description for variables
288c5922fbfSRuslan Ermilovthat can be used for source builds.
289c5922fbfSRuslan Ermilov.Bl -tag -width indent
290c5922fbfSRuslan ErmilovEOF
291317c99b7SBryan Drewery	show settings SRC_ENV_CONF=/dev/null | sort > $t/config_default
292f506e293SEd Maste	# Work around WITH_LDNS_UTILS forcing BIND_UTILS off by parsing the
293f506e293SEd Maste	# actual config that results from enabling every WITH_ option.  This
294f506e293SEd Maste	# can be reverted if/when we no longer have options that disable
295f506e293SEd Maste	# others.
296317c99b7SBryan Drewery	show with SRC_ENV_CONF=/dev/null | sort | sed 's/$/=/' > $t/src.conf
297317c99b7SBryan Drewery	show settings SRC_ENV_CONF=$t/src.conf | sort > $t/config_WITH_ALL
298317c99b7SBryan Drewery	show without SRC_ENV_CONF=/dev/null | sort > $t/config_WITHOUT_ALL
299177d707cSBryan Drewery	env_only_options="$(${make} MK_AUTO_OBJ=no -V __ENV_ONLY_OPTIONS)"
3002701a1b7SRuslan Ermilov
3012701a1b7SRuslan Ermilov	show_options |
3022701a1b7SRuslan Ermilov	while read opt targets ; do
3032701a1b7SRuslan Ermilov		if [ ! -f ${opt} ] ; then
3042701a1b7SRuslan Ermilov			echo "no description found for ${opt}, skipping" >&2
305c3b08cc6SYaroslav Tykhiy			continue
306cae68befSRuslan Ermilov		fi
307cae68befSRuslan Ermilov
3082701a1b7SRuslan Ermilov		echo ".It Va ${opt}"
309983e4096SEd Maste		sed -e'/\$FreeBSD.*\$/d' ${opt}
3102701a1b7SRuslan Ermilov		if [ -n "${targets}" ] ; then
3112701a1b7SRuslan Ermilov			echo '.Pp'
3127a206c31SWarren Block			echo 'This is a default setting on'
3132701a1b7SRuslan Ermilov			echo $(echo ${targets} | sed -e's/ /, /g' -e's/\(.*\), /\1 and /').
314c5922fbfSRuslan Ermilov		fi
3152701a1b7SRuslan Ermilov
316cae68befSRuslan Ermilov		if [ "${opt%%_*}" = 'WITHOUT' ] ; then
3172701a1b7SRuslan Ermilov			sed -n "/^WITH_${opt#WITHOUT_}$/!s/$/=/p" $t/config_WITH_ALL > $t/src.conf
318317c99b7SBryan Drewery			show settings SRC_ENV_CONF=$t/src.conf -D${opt} | sort > $t/config_WITH_ALL_${opt}
3192701a1b7SRuslan Ermilov			comm -13 $t/config_WITH_ALL $t/config_WITH_ALL_${opt} | sed -n "/^${opt}$/!p" > $t/deps
320cae68befSRuslan Ermilov		elif [ "${opt%%_*}" = 'WITH' ] ; then
3212701a1b7SRuslan Ermilov			sed -n "/^WITHOUT${opt#WITH}$/!s/$/=/p" $t/config_WITHOUT_ALL > $t/src.conf
322317c99b7SBryan Drewery			show settings SRC_ENV_CONF=$t/src.conf -D${opt} | sort > $t/config_WITHOUT_ALL_${opt}
3232701a1b7SRuslan Ermilov			comm -13 $t/config_WITHOUT_ALL $t/config_WITHOUT_ALL_${opt} | sed -n "/^${opt}$/!p" > $t/deps
3242701a1b7SRuslan Ermilov		else
3252701a1b7SRuslan Ermilov			echo 'internal error' >&2
3262701a1b7SRuslan Ermilov			exit 1
3272701a1b7SRuslan Ermilov		fi
3282701a1b7SRuslan Ermilov
329317c99b7SBryan Drewery		show settings SRC_ENV_CONF=/dev/null -D${opt} | sort > $t/config_${opt}
330f506e293SEd Maste		comm -13 $t/config_default $t/config_${opt} | sed -n "/^${opt}$/!p" |
331f506e293SEd Maste		comm -13 $t/deps - > $t/deps2
332f506e293SEd Maste
3334078537cSBryan Drewery		havedeps=0
3342701a1b7SRuslan Ermilov		if [ -s $t/deps ] ; then
3354078537cSBryan Drewery			havedeps=1
3367a206c31SWarren Block			echo 'When set, it enforces these options:'
3372701a1b7SRuslan Ermilov			echo '.Pp'
3382701a1b7SRuslan Ermilov			echo '.Bl -item -compact'
3394078537cSBryan Drewery			while read opt2 ; do
3402701a1b7SRuslan Ermilov				echo '.It'
3412701a1b7SRuslan Ermilov				echo ".Va ${opt2}"
3424078537cSBryan Drewery			done < $t/deps
3432701a1b7SRuslan Ermilov			echo '.El'
3442701a1b7SRuslan Ermilov		fi
3452701a1b7SRuslan Ermilov
3462701a1b7SRuslan Ermilov		if [ -s $t/deps2 ] ; then
3474078537cSBryan Drewery			if [ ${havedeps} -eq 1 ] ; then
3482701a1b7SRuslan Ermilov				echo '.Pp'
3492701a1b7SRuslan Ermilov			fi
3507a206c31SWarren Block			echo 'When set, these options are also in effect:'
3512701a1b7SRuslan Ermilov			echo '.Pp'
3522701a1b7SRuslan Ermilov			echo '.Bl -inset -compact'
3534078537cSBryan Drewery			while read opt2 ; do
3542701a1b7SRuslan Ermilov				echo ".It Va ${opt2}"
3552701a1b7SRuslan Ermilov				noopt=$(echo ${opt2} | sed -e's/WITH_/WITHOUT_/;t' -e's/WITHOUT_/WITH_/')
3562701a1b7SRuslan Ermilov				echo '(unless'
3572701a1b7SRuslan Ermilov				echo ".Va ${noopt}"
3582701a1b7SRuslan Ermilov				echo 'is set explicitly)'
3594078537cSBryan Drewery			done < $t/deps2
3602701a1b7SRuslan Ermilov			echo '.El'
361c5922fbfSRuslan Ermilov		fi
362da6e996dSBryan Drewery
363da6e996dSBryan Drewery		case " ${env_only_options} " in
364da6e996dSBryan Drewery			*\ ${opt#*_}\ *)
365da6e996dSBryan Drewery				echo ".Pp"
366317c99b7SBryan Drewery				echo "This must be set in the environment, make command line, or"
367da6e996dSBryan Drewery				echo ".Pa /etc/src-env.conf ,"
368da6e996dSBryan Drewery				echo "not"
369da6e996dSBryan Drewery				echo ".Pa /etc/src.conf ."
370da6e996dSBryan Drewery				;;
371da6e996dSBryan Drewery		esac
372da6e996dSBryan Drewery
373cc36164aSBrooks Davis		printf "." >&2
374c5922fbfSRuslan Ermilov	done
375cc36164aSBrooks Davis	printf "\n" >&2
376c5922fbfSRuslan Ermilov	cat <<EOF
377c5922fbfSRuslan Ermilov.El
378897ae85fSBrooks Davis.Pp
379897ae85fSBrooks DavisThe following options accept a single value from a list of valid values.
380897ae85fSBrooks Davis.Bl -tag -width indent
381897ae85fSBrooks DavisEOF
382*65fd76b5SEd Maste	prev_opt=
383897ae85fSBrooks Davis	show_group_options |
384897ae85fSBrooks Davis	while read opt ; do
385897ae85fSBrooks Davis		if [ ! -f ${opt} ] ; then
386897ae85fSBrooks Davis			echo "no description found for ${opt}, skipping" >&2
387897ae85fSBrooks Davis			continue
388897ae85fSBrooks Davis		fi
389*65fd76b5SEd Maste		if [ $opt = "$prev_opt" ]; then
390*65fd76b5SEd Maste			echo "ignoring duplicate option $opt" >&2
391*65fd76b5SEd Maste			continue
392*65fd76b5SEd Maste		fi
393*65fd76b5SEd Maste		prev_opt=$opt
394897ae85fSBrooks Davis
395897ae85fSBrooks Davis		echo ".It Va ${opt}"
396897ae85fSBrooks Davis		cat ${opt}
397897ae85fSBrooks Davis	done
398897ae85fSBrooks Davis	cat <<EOF
399897ae85fSBrooks Davis.El
400c5922fbfSRuslan Ermilov.Sh FILES
401691b39b5SGlen Barber.Bl -tag -compact -width Pa
402c5922fbfSRuslan Ermilov.It Pa /etc/src.conf
403ca045714SBryan Drewery.It Pa /etc/src-env.conf
404c5922fbfSRuslan Ermilov.It Pa /usr/share/mk/bsd.own.mk
405c5922fbfSRuslan Ermilov.El
406c5922fbfSRuslan Ermilov.Sh SEE ALSO
407c5922fbfSRuslan Ermilov.Xr make 1 ,
408c5922fbfSRuslan Ermilov.Xr make.conf 5 ,
409c5922fbfSRuslan Ermilov.Xr build 7 ,
410c5922fbfSRuslan Ermilov.Xr ports 7
411c5922fbfSRuslan Ermilov.Sh HISTORY
412c5922fbfSRuslan ErmilovThe
413c5922fbfSRuslan Ermilov.Nm
414c5922fbfSRuslan Ermilovfile appeared in
415c5922fbfSRuslan Ermilov.Fx 7.0 .
416c5922fbfSRuslan Ermilov.Sh AUTHORS
417fd4f2cd5SEnji CooperThis manual page was autogenerated by
418cbc5a508SEnji Cooper.An tools/build/options/makeman .
419c5922fbfSRuslan ErmilovEOF
420c5922fbfSRuslan Ermilov}
421c5922fbfSRuslan Ermilov
422c5922fbfSRuslan Ermilovmain
423