summaryrefslogtreecommitdiffstats
path: root/source/script/installman.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source/script/installman.sh')
-rwxr-xr-xsource/script/installman.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/source/script/installman.sh b/source/script/installman.sh
index 6278012635f..3bbca1a8aa5 100755
--- a/source/script/installman.sh
+++ b/source/script/installman.sh
@@ -18,6 +18,10 @@ if test ! -d $SRCDIR../docs/manpages; then
exit 0
fi
+# Get the configured feature set
+test -f "${SRCDIR}/config.log" && \
+ eval $( grep "^[[:alnum:]]*=.*" "${SRCDIR}/config.log")
+
for lang in $langs; do
if [ "X$lang" = XC ]; then
echo Installing default man pages in $MANDIR/
@@ -40,13 +44,20 @@ for lang in $langs; do
for sect in 1 5 7 8 ; do
for m in $langdir/man$sect ; do
for s in $SRCDIR../docs/manpages/$lang/*$sect; do
- FNAME=$m/`basename $s`
-
+ MP_BASENAME=${s##*/}
+
+ # Check if this man page if required by the configured feature set
+ case "${MP_BASENAME}" in
+ smbsh.1) test -z "${SMBWRAPPER}" && continue ;;
+ *) ;;
+ esac
+
+ FNAME="$m/${MP_BASENAME}"
+
# Test for writability. Involves
# blowing away existing files.
if (rm -f $FNAME && touch $FNAME); then
- rm $FNAME
if [ "x$GROFF" = x ] ; then
cp $s $m # Copy raw nroff
else