2006-03-21 09:05:42 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# This file is in the public domain.
|
|
|
|
|
|
|
|
ident='$FreeBSD$'
|
|
|
|
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
make "$@" -f ../../../share/mk/bsd.own.mk SRCCONF=/dev/null -V_ -dg1 |
|
|
|
|
grep ^MK_ |sort |
|
|
|
|
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 _config _config2 _deps' exit
|
|
|
|
ident=${ident#$}
|
|
|
|
ident=${ident% $}
|
2006-03-21 09:08:45 +00:00
|
|
|
fbsdid='$'FreeBSD'$'
|
2006-03-21 09:05:42 +00:00
|
|
|
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
|
2006-05-16 18:59:00 +00:00
|
|
|
.Nd "source build options"
|
2006-03-21 09:05:42 +00:00
|
|
|
.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
|
|
|
|
maybe 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
|
2006-05-16 18:59:00 +00:00
|
|
|
source code, which is usually located in
|
2006-03-21 09:05:42 +00:00
|
|
|
.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 environment; see
|
|
|
|
.Xr environ 7 .
|
|
|
|
.Pp
|
2006-05-20 04:32:10 +00:00
|
|
|
The values of variables are ignored regardless of their setting;
|
2006-05-16 18:59:00 +00:00
|
|
|
even if they would be set to
|
2006-03-21 09:05:42 +00:00
|
|
|
.Dq Li FALSE
|
|
|
|
or
|
2006-05-16 18:59:00 +00:00
|
|
|
.Dq Li NO .
|
|
|
|
Just the existence of an option will cause
|
|
|
|
it to be honoured by
|
|
|
|
.Xr make 1 .
|
2006-03-21 09:05:42 +00:00
|
|
|
.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 >_config
|
|
|
|
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
|
2006-07-31 12:41:13 +00:00
|
|
|
continue
|
2006-03-21 09:05:42 +00:00
|
|
|
fi
|
|
|
|
show settings -D${opt} |sort >_config2
|
|
|
|
comm -13 _config _config2 |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
|
|
|
|
done
|
|
|
|
cat <<EOF
|
|
|
|
.El
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
cat <<EOF
|
|
|
|
.El
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -compact
|
|
|
|
.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
|