#!/bin/sh # This scripts shows steps that needs to be done to compile debea library # from svn sources. # Please do not modify this script. If you want to pass different paths or # build diffrent plugins please modify a copy. # dir where sources are unpacked SOURCES_DIR=$(pwd); # plugins to build (passed to configure) DBA_PLUGINS="--enable-csv --enable-odbc --enable-sqlite3 --enable-pgsql --enable-xml --enable-docs" # place where libraries should be installed DEVEL=$HOME/devel/debea # configure flags for all libraries DEBEA_CONFIGURE_FLAGS="--enable-debug --prefix=$DEVEL --enable-tests --enable-shared" # place where libraries should be build BUILD_DIR=$HOME/build/debea # additional flags for aclocal run by Makefile.csv # aclocal needs to have path to build.m4 from aclocal # bakefile.m4 and wxwin.m4 for wxdba DEBEA_ACLOCAL_FLAGS="-I $SOURCES_DIR/aclocal -I $HOME/share/aclocal" # bakefile_gen run from Makefile.cvs needs to find additional files: # syslibs.bkl and baseprj.bkl from "presets" dir and presets generated by each library # remember that bakefile appends 'presets' subdir to each path component BAKEFILE_PATHS=$DEVEL/share/bakefile:$SOURCES_DIR # Allow regression tests to find built plugins and dll build of wxdba to find libdbad.so # build directories are for regression tests to find libraries and plugins LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BUILD_DIR/dba:$BUILD_DIR/wxdba:$DEVEL/lib # simple function to check return code check_error() { if test $? -ne 0; then echo "ERROR $1"; exit 1; fi } # create build dirs mkdir -p $BUILD_DIR/dba mkdir -p $BUILD_DIR/wxdba # let configure find common-config and dba-config where debea is supposed to be installed # we append dba build dir because regression tests needs to find plugins to run. PATH=$PATH:$DEVEL/bin: export PATH DEBEA_ACLOCAL_FLAGS BAKEFILE_PATHS LD_LIBRARY_PATH; # create configure script for dba library cd $SOURCES_DIR/dba; make -f Makefile.cvs check_error 'dba autoconf'; # build dba library. cd $BUILD_DIR/dba; $SOURCES_DIR/dba/configure $DEBEA_CONFIGURE_FLAGS $DBA_PLUGINS; check_error 'dba configure'; make; check_error 'dba make'; make check; check_error 'dba regression tests'; make install; check_error 'dba install'; # create configure script for wxdba library cd $SOURCES_DIR/wxdba; make -f Makefile.cvs check_error 'wxdba autoconf'; # build wxdba library - needs wxWidgets to build cd $BUILD_DIR/wxdba; $SOURCES_DIR/wxdba/configure $DEBEA_CONFIGURE_FLAGS; check_error 'wxdba configure'; make; check_error 'wxdba make'; make check; check_error 'wxdba regression tests'; make install; check_error 'wxdba install';