d'oh; when specifying CPPFLAGS, gcc should use them.

while here, restructure the file.

With these changes, mirbsdksh-1.2 passes all expectations and tests
on Walgrind GNU/Linux (-current version); thanks to cnuke@ (Josef
"Jupp" Söntgen) to having me a test account to validate this.
This commit is contained in:
tg
2004-03-21 02:47:58 +00:00
parent be20ad9892
commit 83b5247f5d

View File

@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# $MirBSD: BuildGNU.sh,v 1.2 2004/03/21 01:51:25 tg Exp $ # $MirBSD: BuildGNU.sh,v 1.3 2004/03/21 02:47:58 tg Exp $
#- #-
# Copyright (c) 2004 # Copyright (c) 2004
# Thorsten "mirabile" Glaser <x86@ePost.de> # Thorsten "mirabile" Glaser <x86@ePost.de>
@@ -20,14 +20,23 @@
#- #-
# Build the mirbsdksh on GNU operating systems # Build the mirbsdksh on GNU operating systems
CC="${CC:-gcc}"
CPPFLAGS="$CPPFLAGS -DKSH -DHAVE_CONFIG_H -I."
CFLAGS="-O2 -fomit-frame-pointer -fno-strict-aliasing -static $CFLAGS"
if [ -e strlcpy.c -a -e strlcat.c ]; then if [ -e strlcpy.c -a -e strlcat.c ]; then
echo "Configuring..."
/bin/sh ./configure /bin/sh ./configure
/bin/sh ./siglist.sh "gcc -E -DKSH -DHAVE_CONFIG_H -I." \ echo "Generating prerequisites..."
<siglist.in >siglist.out /bin/sh ./siglist.sh "gcc -E $CPPFLAGS" <siglist.in >siglist.out
/bin/sh ./emacs-gen.sh emacs.c >emacs.out /bin/sh ./emacs-gen.sh emacs.c >emacs.out
${CC:-gcc} -O2 -fomit-frame-pointer -static $CFLAGS -o ksh *.c echo "Building..."
$CC $CFLAGS $CPPFLAGS -o ksh *.c
echo "Finalizing..."
tbl <ksh.1tbl | nroff -mandoc -Tascii >ksh.cat1 tbl <ksh.1tbl | nroff -mandoc -Tascii >ksh.cat1
strip --strip-unneeded --strip-all -R .note -R .comment ksh strip --strip-unneeded --strip-all -R .note -R .comment ksh
size ksh
echo "done."
else else
echo "Copy strlcpy.c and strlcat.c here first, and" echo "Copy strlcpy.c and strlcat.c here first, and"
echo "optionally kill Ulrich Drepper & co. for not" echo "optionally kill Ulrich Drepper & co. for not"