diff --git a/BuildGNU.sh b/BuildGNU.sh index 964e9fb..73e6c56 100644 --- a/BuildGNU.sh +++ b/BuildGNU.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $MirBSD: BuildGNU.sh,v 1.6 2004/04/07 17:14:11 tg Exp $ +# $MirBSD: BuildGNU.sh,v 1.7 2004/04/07 18:43:41 tg Exp $ #- # Copyright (c) 2004 # Thorsten "mirabile" Glaser @@ -19,19 +19,27 @@ # possibility of such damage. #- # Build the mirbsdksh on GNU operating systems (and more?) +# Note: on some systems, you must run it with a pre-existing bash or +# korn shell, because the Bourne seems to choke on the if sta- +# tement below for some unknown reason. +# Note: Solaris might want LDFLAGS=-ldl, some GNU/Linux systems usu- +# ally have problems with their perl path (use -I for the .ph) +SHELL="${SHELL:-/bin/sh}"; export SHELL +CONFIG_SHELL="${SHELL}"; export CONFIG_SHELL CC="${CC:-gcc}" CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H -I. -DKSH" -CFLAGS="-O2 -fomit-frame-pointer -fno-strict-aliasing -static $CFLAGS" +CFLAGS="-O2 -fomit-frame-pointer -fno-strict-aliasing $CFLAGS" +LDFLAGS="${LDFLAGS:--static}" if [ -e strlcpy.c -a -e strlcat.c ]; then echo "Configuring..." - /bin/sh ./configure + $SHELL ./configure echo "Generating prerequisites..." - /bin/sh ./siglist.sh "gcc -E $CPPFLAGS" siglist.out - /bin/sh ./emacs-gen.sh emacs.c >emacs.out + $SHELL ./siglist.sh "gcc -E $CPPFLAGS" siglist.out + $SHELL ./emacs-gen.sh emacs.c >emacs.out echo "Building..." - $CC $CFLAGS $CPPFLAGS -o ksh *.c + $CC $CFLAGS $CPPFLAGS $LDFLAGS -o ksh *.c echo "Finalizing..." tbl ksh.cat1 strip -R .note -R .comment -R .rel.dyn -R .sbss \ @@ -43,3 +51,6 @@ else echo "optionally kill Ulrich Drepper & co. for not" echo "including it into your broken libc imitation" fi + +# If you want to test mirbsdksh: +# $ perl ./tests/th -s ./tests -p ./ksh -C pdksh,sh,ksh,posix,posix-upu diff --git a/version.c b/version.c index 9995730..0ea7736 100644 --- a/version.c +++ b/version.c @@ -1,4 +1,4 @@ -/* $MirBSD: version.c,v 1.2 2004/03/21 01:51:26 tg Exp $ */ +/* $MirBSD: version.c,v 1.3 2004/04/07 18:43:42 tg Exp $ */ /* $OpenBSD: version.c,v 1.12 1999/07/14 13:37:24 millert Exp $ */ /* @@ -7,5 +7,5 @@ #include "sh.h" -const char ksh_version [] = - "@(#)PD KSH v5.2.14 99/07/13.2 MirOS $Revision: 1.2 $"; +const char ksh_version[] = + "@(#)PD KSH v5.2.14 99/07/13.2 MirOS $Revision: 1.3 $";