Merge remote-tracking branch 'mksh/master'
Conflicts: Makefile edit.c eval.c exec.c main.c misc.c sh.h var.c
This commit is contained in:
54
Build.sh
54
Build.sh
@@ -1,5 +1,5 @@
|
||||
#!/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
|
||||
@@ -120,7 +120,7 @@ do_genopt() {
|
||||
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"
|
||||
@@ -133,7 +133,7 @@ do_genopt() {
|
||||
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)"
|
||||
@@ -584,7 +584,7 @@ if test -d $tfn || test -d $tfn.exe; then
|
||||
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"
|
||||
@@ -755,6 +755,24 @@ GNU/kFreeBSD)
|
||||
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)
|
||||
@@ -833,7 +851,8 @@ OpenBSD)
|
||||
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}"
|
||||
@@ -982,7 +1001,7 @@ drop us a success or failure notice or even send in diffs.
|
||||
$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
|
||||
|
||||
@@ -1460,6 +1479,7 @@ gcc)
|
||||
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)
|
||||
@@ -1488,8 +1508,12 @@ msc)
|
||||
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
|
||||
@@ -2344,7 +2368,7 @@ addsrcs '!' HAVE_STRLCPY strlcpy.c
|
||||
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
|
||||
|
||||
@@ -2590,8 +2614,8 @@ esac
|
||||
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
|
||||
@@ -2605,12 +2629,14 @@ if test $legacy = 0; then
|
||||
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.
|
||||
|
Reference in New Issue
Block a user