-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
executable file
·60 lines (50 loc) · 1.09 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env bash
#
# Public Domain
#
# script to build LuaEWTS library (inspired from LuaTeX's one).
# ----------
# Options:
# --mingw : crosscompile for mingw32 from i-386linux
# try to find bash, in case the standard shell is not capable of
# handling the generated configure's += variable assignments
if which bash >/dev/null
then
CONFIG_SHELL=`which bash`
export CONFIG_SHELL
fi
MINGWCROSS=FALSE
until [ -z "$1" ]; do
case "$1" in
--mingw ) MINGWCROSS=TRUE ;;
* ) echo "ERROR: invalid build.sh parameter: $1"; exit 1 ;;
esac
shift
done
ARCH=`uname -s`
LINUXARCH=Linux
if [ "$MINGWCROSS" = "TRUE" ]
then
MINGWBUILD=$HOSTTYPE-$OSTYPE
MINGWSTR=mingw32
if [ -d /usr/mingw32 ]; then
MINGWSTR=mingw32
else
if [ -d /usr/i686-w64-mingw32 ]; then
MINGWSTR=i686-w64-mingw32
else
if [ -d /usr/i586-mingw32msvc ]; then
MINGWSTR=i586-mingw32msvc
fi
fi
fi
OLDPATH=$PATH
PATH=/usr/$MINGWSTR/bin:$PATH
ARCH=$MINGWSTR
fi
export ARCH LINUXARCH
make
if [ "$MINGWCROSS" = "TRUE" ]
then
PATH=$OLDPATH
fi