2017-12-19 04:59:29 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
command -v clang 2>&1 > /dev/null && CXX=clang++
|
|
|
|
CXX=${CXX:-g++}
|
|
|
|
CONFOPTS="CXX=$CXX"
|
|
|
|
|
|
|
|
SILENT="${SILENT:-yes}"
|
|
|
|
if [ "${SILENT}" = "yes" ]
|
|
|
|
then
|
2017-12-20 15:33:19 +00:00
|
|
|
CONFOPTS="$CONFOPTS"
|
2017-12-19 04:59:29 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
[ -d m4 ] || mkdir m4
|
|
|
|
|
|
|
|
if [ "$(uname -o)" = "Android" ]
|
|
|
|
then
|
|
|
|
SRCDIR="$(pwd)"
|
|
|
|
BUILDDIR=$HOME/build/ods
|
|
|
|
[ -d "$BUILDDIR" ] && rm -rf $BUILDDIR
|
|
|
|
mkdir -p $BUILDDIR && cd $BUILDDIR
|
|
|
|
autoreconf -i $SRCDIR
|
|
|
|
bash $SRCDIR/configure $CONFOPTS
|
2017-12-21 22:02:49 +00:00
|
|
|
[ -d "$BUILDDIR/data" ] || mkdir "$BUILDDIR/data"
|
|
|
|
cp $SRCDIR/data/corpus* "$BUILDDIR/data"
|
2017-12-19 04:59:29 +00:00
|
|
|
else
|
|
|
|
autoreconf -i
|
|
|
|
./configure $CONFOPTS
|
|
|
|
fi
|
|
|
|
pwd
|
|
|
|
make
|