- 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.
This commit is contained in:
Ruslan Ermilov 2007-12-12 16:39:32 +00:00
parent a59d6a8724
commit 6dc51eca81
5 changed files with 39 additions and 14 deletions

View File

@ -62,12 +62,8 @@ _libbluetooth= libbluetooth
_libsdp= libsdp
.endif
.if ${MK_KERBEROS} != "no"
.if ${MK_GSSAPI} != "no"
_libgssapi= libgssapi
.else
.if ${MK_GSSAPI} == "yes"
_libgssapi= libgssapi
.endif
.endif
.if ${MK_IPX} != "no"

View File

@ -381,7 +381,6 @@ MK_${var}:= yes
#
.for var in \
BIND_LIBS \
GSSAPI \
HESIOD \
IDEA
.if defined(WITH_${var}) && defined(WITHOUT_${var})
@ -479,6 +478,27 @@ MK_${var}_SUPPORT:= no
MK_${var}_SUPPORT:= yes
.endif
.endfor
#
# MK_* options whose default value depends on another option.
#
.for vv in \
GSSAPI/KERBEROS
.if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H})
.error WITH_${vv:H} and WITHOUT_${vv:H} can't both be set.
.endif
.if defined(MK_${vv:H})
.error MK_${vv:H} can't be set by a user.
.endif
.if defined(WITH_${vv:H})
MK_${vv:H}:= yes
.elif defined(WITHOUT_${vv:H})
MK_${vv:H}:= no
.else
MK_${vv:H}:= ${MK_${vv:T}}
.endif
.endfor
.endif # !_WITHOUT_SRCCONF
.endif # !target(__<bsd.own.mk>__)

View File

@ -0,0 +1,2 @@
.\" $FreeBSD$
Set to not build libgssapi.

View File

@ -1,4 +0,0 @@
.\" $FreeBSD$
Set to build libgssapi when
.Va WITHOUT_KERBEROS
is set.

View File

@ -49,7 +49,7 @@ show()
main()
{
trap 'rm -f _config _config2 _deps' exit
trap 'rm -f _defcfg _config _config2 _deps _deps2' exit
ident=${ident#$}
ident=${ident% $}
fbsdid='$'FreeBSD'$'
@ -134,7 +134,7 @@ 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 settings |sort >_defcfg
show options |
while read opt; do
if [ -f ${opt} ]; then
@ -146,8 +146,8 @@ EOF
echo "no description found for ${opt}, skipping" >/dev/stderr
continue
fi
show settings -D${opt} |sort >_config2
comm -13 _config _config2 |grep -v "^${opt}$" >_deps
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:
@ -159,6 +159,17 @@ 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