root/trunk/debea_dev_build.sh

Revision 186, 2.6 kB (checked in by zork, 3 months ago)

merged changes from rev #184

  • Property svn:executable set to *
Line 
1 #!/bin/sh
2
3 # This scripts shows steps that needs to be done to compile debea library
4 # from svn sources.
5 # Please do not modify this script. If you want to pass different paths or
6 # build diffrent plugins please modify a copy.
7
8 # dir where sources are unpacked
9 SOURCES_DIR=$(pwd);
10
11 # plugins to build (passed to configure)
12 DBA_PLUGINS="--enable-csv --enable-odbc --enable-sqlite3 --enable-pgsql --enable-tests --enable-docs"
13
14 # place where libraries should be installed
15 DEVEL=$HOME/devel/debea
16
17 # configure flags for all libraries
18 DEBEA_CONFIGURE_FLAGS="--enable-debug --prefix=$DEVEL --enable-tests"
19
20 # place where libraries should be build
21 BUILD_DIR=$HOME/build/debea
22
23 # additional flags for aclocal run by Makefile.csv
24 # aclocal needs to have path to build.m4 from aclocal
25 # bakefile.m4 and wxwin.m4 for wxdba
26 DEBEA_ACLOCAL_FLAGS="-I $SOURCES_DIR/aclocal -I $HOME/share/aclocal"
27
28 # bakefile_gen run from Makefile.cvs needs to find additional files:
29 # syslibs.bkl and baseprj.bkl from "presets" dir and presets generated by each library
30 # remember that bakefile appends 'presets' subdir to each path component
31 BAKEFILE_PATHS=$DEVEL/share/bakefile:$SOURCES_DIR
32
33 # Allow regression tests to find built plugins and dll build of wxdba to find libdbad.so
34 # build directories are for regression tests to find libraries and plugins
35 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BUILD_DIR/dba:$BUILD_DIR/wxdba:$DEVEL/lib
36
37 # simple function to check return code
38 check_error() {
39   if test $? -ne 0; then
40     echo "ERROR $1";
41     exit 1;
42   fi
43 }
44
45 # create build dirs
46 mkdir -p $BUILD_DIR/dba
47 mkdir -p $BUILD_DIR/wxdba
48
49 # let configure find common-config and dba-config where debea is supposed to be installed
50 # we append dba build dir because regression tests needs to find plugins to run.
51 PATH=$PATH:$DEVEL/bin:
52
53 export PATH DEBEA_ACLOCAL_FLAGS BAKEFILE_PATHS LD_LIBRARY_PATH;
54
55 # create configure script for dba library
56 cd $SOURCES_DIR/dba;
57 make -f Makefile.cvs
58 check_error 'dba autoconf';
59
60 # build dba library.
61 cd $BUILD_DIR/dba;
62 $SOURCES_DIR/dba/configure $DEBEA_CONFIGURE_FLAGS $DBA_PLUGINS;
63 check_error 'dba configure';
64 make;
65 check_error 'dba make';
66 make check;
67 check_error 'dba regression tests';
68 make install;
69 check_error 'dba install';
70
71 # create configure script for wxdba library
72 cd $SOURCES_DIR/wxdba;
73 make -f Makefile.cvs
74 check_error 'wxdba autoconf';
75
76 # build wxdba library - needs wxWidgets to build
77 cd $BUILD_DIR/wxdba;
78 $SOURCES_DIR/wxdba/configure $DEBEA_CONFIGURE_FLAGS;
79 check_error 'wxdba configure';
80 make;
81 check_error 'wxdba make';
82 make check;
83 check_error 'wxdba regression tests';
84 make install;
85 check_error 'wxdba install';
86
Note: See TracBrowser for help on using the browser.