• don’t accidentally remove lksh.1 from the srcdir for in-srcdir builds

• fix post-build non-‘-Q’ output for lksh

both discovered in Fedora; thanks rsc
This commit is contained in:
tg 2013-05-05 13:38:00 +00:00
parent 1d0409d932
commit f02f8afe6e
1 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.630 2013/05/02 21:59:44 tg Exp $' srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.631 2013/05/05 13:38:00 tg Exp $'
#- #-
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013 # 2011, 2012, 2013
@ -63,7 +63,7 @@ vq() {
rmf() { rmf() {
for _f in "$@"; do for _f in "$@"; do
case $_f in case $_f in
Build.sh|check.pl|check.t|dot.mkshrc|*.c|*.h|mksh.1) ;; Build.sh|check.pl|check.t|dot.mkshrc|*.c|*.h|lksh.1|mksh.1) ;;
*) rm -f "$_f" ;; *) rm -f "$_f" ;;
esac esac
done done
@ -458,7 +458,7 @@ oswarn=
ccpc=-Wc, ccpc=-Wc,
ccpl=-Wl, ccpl=-Wl,
tsts= tsts=
ccpr='|| for _f in ${tcfn}*; do case $_f in Build.sh|check.pl|check.t|dot.mkshrc|*.c|*.h|mksh.1) ;; *) rm -f "$_f" ;; esac; done' ccpr='|| for _f in ${tcfn}*; do case $_f in Build.sh|check.pl|check.t|dot.mkshrc|*.c|*.h|lksh.1|mksh.1) ;; *) rm -f "$_f" ;; esac; done'
# Evil hack # Evil hack
if test x"$TARGET_OS" = x"Android"; then if test x"$TARGET_OS" = x"Android"; then
@ -1531,7 +1531,7 @@ else
#define EXTERN #define EXTERN
#define MKSH_INCLUDES_ONLY #define MKSH_INCLUDES_ONLY
#include "sh.h" #include "sh.h"
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.630 2013/05/02 21:59:44 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.631 2013/05/05 13:38:00 tg Exp $");
int main(void) { printf("Hello, World!\n"); return (0); } int main(void) { printf("Hello, World!\n"); return (0); }
EOF EOF
case $cm in case $cm in
@ -2268,8 +2268,10 @@ test 1 = $eq && e=:
$e $e
$e Installing the shell: $e Installing the shell:
$e "# $i -c -s -o root -g bin -m 555 $tfn /bin/$tfn" $e "# $i -c -s -o root -g bin -m 555 $tfn /bin/$tfn"
$e "# grep -x /bin/$tfn /etc/shells >/dev/null || echo /bin/$tfn >>/etc/shells" if test $legacy = 0; then
$e "# $i -c -o root -g bin -m 444 dot.mkshrc /usr/share/doc/mksh/examples/" $e "# grep -x /bin/$tfn /etc/shells >/dev/null || echo /bin/$tfn >>/etc/shells"
$e "# $i -c -o root -g bin -m 444 dot.mkshrc /usr/share/doc/mksh/examples/"
fi
$e $e
$e Installing the manual: $e Installing the manual:
if test -f $tfn.cat1; then if test -f $tfn.cat1; then
@ -2277,7 +2279,7 @@ if test -f $tfn.cat1; then
"/usr/share/man/cat1/$tfn.0" "/usr/share/man/cat1/$tfn.0"
$e or $e or
fi fi
$e "# $i -c -o root -g bin -m 444 mksh.1 /usr/share/man/man1/$tfn.1" $e "# $i -c -o root -g bin -m 444 $tfn.1 /usr/share/man/man1/$tfn.1"
$e $e
$e Run the regression test suite: ./test.sh $e Run the regression test suite: ./test.sh
$e Please also read the sample file dot.mkshrc and the fine manual. $e Please also read the sample file dot.mkshrc and the fine manual.