#!/bin/sh
-srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.702 2016/08/10 18:20:16 tg Exp $'
+srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.707 2016/11/11 23:31:29 tg Exp $'
#-
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013, 2014, 2015, 2016
state=3
;;
1:@@)
- # begin of data block
+ # start of data block
o_gen=$o_gen$nl"#endif"
o_gen=$o_gen$nl"#ifndef F0"
o_gen=$o_gen$nl"#define F0 FN"
o_hdr=$o_hdr$nl$line
;;
0:@*|1:@*)
- # begin of a definition block
+ # start of a definition block
sym=`echo "$line" | sed 's/^@//'`
if test $state = 0; then
o_gen=$o_gen$nl"#if defined($sym)"
exit 1
fi
rmf a.exe* a.out* conftest.c conftest.exe* *core core.* ${tfn}* *.bc *.dbg \
- *.ll *.o *.gen Rebuild.sh lft no signames.inc test.sh x vv.out
+ *.ll *.o *.gen *.cat1 Rebuild.sh lft no signames.inc test.sh x vv.out
SRCS="lalloc.c eval.c exec.c expr.c funcs.c histrap.c jobs.c"
SRCS="$SRCS lex.c main.c misc.c shf.c syn.c tree.c var.c"
Haiku)
add_cppflags -DMKSH_ASSUME_UTF8; HAVE_ISSET_MKSH_ASSUME_UTF8=1
;;
+Harvey)
+ add_cppflags -D_POSIX_SOURCE
+ add_cppflags -D_LIMITS_EXTENSION
+ add_cppflags -D_BSD_EXTENSION
+ add_cppflags -D_SUSV2_SOURCE
+ add_cppflags -D_GNU_SOURCE
+ add_cppflags -DMKSH_ASSUME_UTF8; HAVE_ISSET_MKSH_ASSUME_UTF8=1
+ add_cppflags -DMKSH_NO_CMDLINE_EDITING
+ add_cppflags -DMKSH__NO_SETEUGID
+ oswarn=' and will currently not work'
+ add_cppflags -DMKSH_UNEMPLOYED
+ add_cppflags -DMKSH_NOPROSPECTOFWORK
+ # these taken from Harvey-OS github and need re-checking
+ add_cppflags -D_setjmp=setjmp -D_longjmp=longjmp
+ : "${HAVE_CAN_NO_EH_FRAME=0}"
+ : "${HAVE_CAN_FNOSTRICTALIASING=0}"
+ : "${HAVE_CAN_FSTACKPROTECTORSTRONG=0}"
+ ;;
HP-UX)
;;
Interix)
OS/2)
HAVE_TERMIOS_H=0
HAVE_MKNOD=0 # setmode() incompatible
- oswarn="; it is currently being ported"
+ oswarn="; it is currently being ported, get it from"
+ oswarn="$oswarn${nl}https://github.com/komh/mksh-os2 in the meanwhile"
check_categories="$check_categories nosymlink"
: "${CC=gcc}"
: "${SIZE=: size}"
add_cppflags -DMKSH_UNEMPLOYED
add_cppflags -DMKSH_NOPROSPECTOFWORK
+ add_cppflags -DMKSH_NO_LIMITS
;;
OSF1)
HAVE_SIG_T=0 # incompatible
$e "$bi$me: Building the MirBSD Korn Shell$ao $ui$dstversion$ao on $TARGET_OS ${TARGET_OSREV}..."
#
-# Begin of mirtoconf checks
+# Start of mirtoconf checks
#
$e $bi$me: Scanning for functions... please ignore any errors.$ao
ac_flags $t_use $t_name "$t_cflags" \
"if gcc supports $t_cflags $t_ldflags" "$t_ldflags"
done
+ ac_flags 1 data_abi_align -malign-data=abi
i=1
;;
hpcc)
ac_flags 1 wp64 "${ccpc}/Wp64" 'to enable 64-bit warnings'
;;
nwcc)
- i=1
#broken# ac_flags 1 ssp -stackprotect
+ i=1
+ ;;
+pcc)
+ ac_flags 1 fstackprotectorall -fstack-protector-all
+ i=1
;;
sunpro)
phase=u
addsrcs USE_PRINTF_BUILTIN printf.c
test 1 = "$USE_PRINTF_BUILTIN" && add_cppflags -DMKSH_PRINTF_BUILTIN
test 1 = "$HAVE_CAN_VERB" && CFLAGS="$CFLAGS -verbose"
-add_cppflags -DMKSH_BUILD_R=530
+add_cppflags -DMKSH_BUILD_R=541
$e $bi$me: Finished configuration testing, now producing output.$ao
tcfn=$mkshexe
test $cm = combine || v "$CC $CFLAGS $LDFLAGS -o $tcfn $lobjs $LIBS $ccpr"
test -f $tcfn || exit 1
-test 1 = $r || v "$NROFF -mdoc <'$srcdir/mksh.1' >$tfn.cat1" || \
- rmf $tfn.cat1
+test 1 = $r || v "$NROFF -mdoc <'$srcdir/lksh.1' >lksh.cat1" || rmf lksh.cat1
+test 1 = $r || v "$NROFF -mdoc <'$srcdir/mksh.1' >mksh.cat1" || rmf mksh.cat1
test 0 = $eq && v $SIZE $tcfn
i=install
test -f /usr/ucb/$i && i=/usr/ucb/$i
fi
$e
$e Installing the manual:
-if test -f $tfn.cat1; then
- $e "# $i -c -o root -g bin -m 444 $tfn.cat1" \
- "/usr/share/man/cat1/$tfn.0"
+if test -f mksh.cat1; then
+ $e "# $i -c -o root -g bin -m 444 lksh.cat1" \
+ "/usr/share/man/cat1/lksh.0"
+ $e "# $i -c -o root -g bin -m 444 mksh.cat1" \
+ "/usr/share/man/cat1/mksh.0"
$e or
fi
-$e "# $i -c -o root -g bin -m 444 $tfn.1 /usr/share/man/man1/$tfn.1"
+$e "# $i -c -o root -g bin -m 444 lksh.1 mksh.1 /usr/share/man/man1/"
$e
$e Run the regression test suite: ./test.sh
$e Please also read the sample file dot.mkshrc and the fine manual.