diff options
author | ru <ru@FreeBSD.org> | 2007-12-12 16:39:32 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2007-12-12 16:39:32 +0000 |
commit | d5938a1c2a6280a3467c8ea87ea54e5ee358beea (patch) | |
tree | d1d138e51bf209dea7b2ab3cb7800819a015f7c0 | |
parent | b02556dae5c4b2e396b5bee2c663fe38f28d369b (diff) | |
download | FreeBSD-src-d5938a1c2a6280a3467c8ea87ea54e5ee358beea.zip FreeBSD-src-d5938a1c2a6280a3467c8ea87ea54e5ee358beea.tar.gz |
- 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.
-rw-r--r-- | lib/Makefile | 6 | ||||
-rw-r--r-- | share/mk/bsd.own.mk | 22 | ||||
-rw-r--r-- | tools/build/options/WITHOUT_GSSAPI | 2 | ||||
-rw-r--r-- | tools/build/options/WITH_GSSAPI | 4 | ||||
-rw-r--r-- | tools/build/options/makeman | 19 |
5 files changed, 39 insertions, 14 deletions
diff --git a/lib/Makefile b/lib/Makefile index 3451703..328e4b3 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -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" diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index d1a89f2..ab9f760 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -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>__) diff --git a/tools/build/options/WITHOUT_GSSAPI b/tools/build/options/WITHOUT_GSSAPI new file mode 100644 index 0000000..0f31dd9 --- /dev/null +++ b/tools/build/options/WITHOUT_GSSAPI @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build libgssapi. diff --git a/tools/build/options/WITH_GSSAPI b/tools/build/options/WITH_GSSAPI deleted file mode 100644 index 77d9cde..0000000 --- a/tools/build/options/WITH_GSSAPI +++ /dev/null @@ -1,4 +0,0 @@ -.\" $FreeBSD$ -Set to build libgssapi when -.Va WITHOUT_KERBEROS -is set. diff --git a/tools/build/options/makeman b/tools/build/options/makeman index f05b686..c3c8758 100644 --- a/tools/build/options/makeman +++ b/tools/build/options/makeman @@ -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 |