* allow build without nroff

* /usr/share/man except in some very weird GNU distributions
This commit is contained in:
tg 2005-06-05 16:34:59 +00:00
parent f860e80cbc
commit 0ee7babfdf

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# $MirOS: src/bin/mksh/Build.sh,v 1.7 2005/05/30 07:05:29 tg Exp $ # $MirOS: src/bin/mksh/Build.sh,v 1.8 2005/06/05 16:34:59 tg Exp $
#- #-
# Recognised command line parameters and their defaults: # Recognised command line parameters and their defaults:
# CC gcc # CC gcc
@ -26,10 +26,17 @@ export SHELL CC
if [ x"$1" = x"-q" ]; then if [ x"$1" = x"-q" ]; then
e=: e=:
q=1 q=1
shift
else else
e=echo e=echo
q=0 q=0
fi fi
if [ x"$1" = x"-r" ]; then
r=1
shift
else
r=0
fi
SRCS="alloc.c edit.c eval.c exec.c expr.c funcs.c histrap.c" SRCS="alloc.c edit.c eval.c exec.c expr.c funcs.c histrap.c"
SRCS="$SRCS jobs.c lex.c main.c misc.c shf.c syn.c tree.c var.c" SRCS="$SRCS jobs.c lex.c main.c misc.c shf.c syn.c tree.c var.c"
@ -47,7 +54,7 @@ $e Building...
-o $curdir/mksh $SRCS $LIBS ) -o $curdir/mksh $SRCS $LIBS )
test -x mksh || exit 1 test -x mksh || exit 1
$e Finalising... $e Finalising...
$NROFF -mdoc <"$srcdir/mksh.1" >mksh.cat1 || rm -f mksh.cat1 [ $r = 1 ] || $NROFF -mdoc <"$srcdir/mksh.1" >mksh.cat1 || rm -f mksh.cat1
[ $q = 1 ] || size mksh [ $q = 1 ] || size mksh
$e done. $e done.
$e $e
@ -64,4 +71,4 @@ if test -s mksh.cat1; then
"/usr/share/man/cat1/mksh.0" "/usr/share/man/cat1/mksh.0"
$e or $e or
fi fi
$e "# install -c -o root -g bin -m 444 mksh.1 /usr/man/man1/mksh.1" $e "# install -c -o root -g bin -m 444 mksh.1 /usr/share/man/man1/mksh.1"