3 ##############################################################################
5 # Setup a build environment. This can take up to two parameters:
6 # argv[1] - build type, can be 'stable' or 'master'; anything else than
7 # 'stable' means 'master' build in the ./Makefile, which uses
8 # relative path for build and if the respective folder is not
9 # downloaded yet, then it creates a checkout from the master git
10 # branch (hence the 'master' build name). There can be built
11 # anything as master, the only condition is that the directory
12 # with the sources is in place.
13 # argv[2] - use "debug" to build with debug options; using 'debug' build type
14 # also uses debug build options
16 ##############################################################################
18 if [ "$BUILD_ROOT_OVERRIDE" = "" ] ; then
19 export BUILD_ROOT_BASE
=/build
/local
21 export BUILD_ROOT_BASE
=$BUILD_ROOT_OVERRIDE
24 # Optional parameter to compile other than 'master' or 'stable' releases;
25 # empty value means 'stable', anything else means 'master' type in Makefile
26 export EVO_BUILD_TYPE
=$1
28 if [ "x$EVO_BUILD_TYPE" == "x" ] ; then
29 # Build 'master' as default
30 export EVO_BUILD_SUFFIX
="-master"
31 export EVO_BUILD_TYPE
="master"
32 elif [ "x$EVO_BUILD_TYPE" != "xstable" ] ; then
33 # Build custom builds like from 'master', aka from relative path checkouts
34 export EVO_BUILD_SUFFIX
="-master"
37 export EVO_BUILD_SUFFIX
="-stable"
38 export EVO_BUILD_TYPE
="stable"
41 export BUILD_ROOT_EVO
=$BUILD_ROOT_BASE/$EVO_BUILD_TYPE
42 export BUILD_ROOT_DEPS
=$BUILD_ROOT_EVO
44 if [ "$PATH_DEFAULT" = "" ] ; then
45 export PATH_DEFAULT
=$PATH
48 export PATH
=$BUILD_ROOT_DEPS/bin
:$BUILD_ROOT_EVO/bin
:$PATH_DEFAULT
50 # Compile against locally installed software.
51 export LD_LIBRARY_PATH
=$BUILD_ROOT_DEPS/lib
:$BUILD_ROOT_EVO/lib
:/lib
52 export PKG_CONFIG_PATH
=$BUILD_ROOT_DEPS/lib
/pkgconfig
:$BUILD_ROOT_EVO/lib
/pkgconfig
:$BUILD_ROOT_DEPS/share
/pkgconfig
:$BUILD_ROOT_EVO/share
/pkgconfig
53 export ACLOCAL_FLAGS
="-I $BUILD_ROOT_DEPS/share/aclocal -I $BUILD_ROOT_EVO/share/aclocal -I /share/aclocal"
54 export GSETTINGS_SCHEMA_DIR
=$BUILD_ROOT_EVO/share
/glib-2.0
/schemas
55 export CPPFLAGS
="$CPPFLAGS -I$BUILD_ROOT_DEPS/include -I$BUILD_ROOT_EVO/include -I/include"
56 export LDFLAGS
="$LDFLAGS -L$BUILD_ROOT_DEPS/lib -L$BUILD_ROOT_EVO/lib -L/lib"
57 if [ "$1" = "debug" -o "$2" = "debug" ] ; then
58 export CFLAGS
="$CFLAGS -g -O0 -Wall -DMSVCRT_VERSION=710"
60 export CFLAGS
="$CFLAGS -g0 -O2 -DMSVCRT_VERSION=710"
61 export LDFLAGS
="$LDFLAGS -Wl,-S"
64 mkdir
-p $BUILD_ROOT_DEPS/bin
2>/dev
/null
65 mkdir
-p $BUILD_ROOT_DEPS/include
2>/dev
/null
66 mkdir
-p $BUILD_ROOT_DEPS/lib
2>/dev
/null
67 mkdir
-p $BUILD_ROOT_DEPS/libexec
2>/dev
/null
68 mkdir
-p $BUILD_ROOT_DEPS/share
/aclocal
2>/dev
/null
69 mkdir
-p $BUILD_ROOT_DEPS/etc
/dbus-
1/session.d
2>/dev
/null
70 #mkdir -p $BUILD_ROOT_DEPS/share/dbus-1 2>/dev/null
72 mkdir
-p $BUILD_ROOT_EVO/bin
2>/dev
/null
73 mkdir
-p $BUILD_ROOT_EVO/include
2>/dev
/null
74 mkdir
-p $BUILD_ROOT_EVO/lib
2>/dev
/null
75 mkdir
-p $BUILD_ROOT_EVO/libexec
2>/dev
/null
76 mkdir
-p $BUILD_ROOT_EVO/share
/aclocal
2>/dev
/null
77 #mkdir -p $BUILD_ROOT_EVO/share/dbus-1 2>/dev/null
79 #rm /usr/local/share/dbus-1 2>/dev/null
80 #ln -s $BUILD_ROOT_DEPS/share/dbus-1 /usr/local/share/dbus-1
82 if [ -f "session-local.conf.in" ] ; then
84 WLIKE_PWD
=`pwd -W | sed 's|/|\\\\\\\\|g'`
86 cat session-local.conf.
in |
sed 's|@BUILD_ROOT_EVO@|'$WLIKE_PWD'\\share\\dbus-1\\services|g' >$BUILD_ROOT_DEPS/etc
/dbus-
1/session-local.conf