diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-23 17:20:00 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-23 17:20:00 +0200 |
commit | 6aa83e7fae4be22e8b81aee60262258c6c2d6f0a (patch) | |
tree | 84e0c9c31ead2f09fe518f5f3c4a7495e91200e0 | |
parent | 4e540775abb7afa27f299b29943d9182fae445e7 (diff) |
Add INSTALL file
-rw-r--r-- | INSTALL | 133 | ||||
-rw-r--r-- | makefile | 4 |
2 files changed, 135 insertions, 2 deletions
@@ -0,0 +1,133 @@ +In this document we use <database> as the name of the database system you +would like to use. Valid values for <database> are: + + 'mysql' - The MySQL database system + +Prerequisites +============= + + - odb http://www.codesynthesis.com/products/odb/ + - libodb http://www.codesynthesis.com/products/odb/ + - libodb-tracer http://www.codesynthesis.com/products/odb/ + - libodb-<database> http://www.codesynthesis.com/products/odb/ + +Building on UNIX +================ + +The following build instructions are for the Linux/UNIX/Mac OS X +operating systems as well as for Cygwin and MinGW on Windows. + +The standard autotools-based build system is used on these platforms. +After unpacking the source code archive, change to the odb-tests +package directory (referred to as odb-tests/ from now on) and run +the configure script, for example: + +./configure --database <database> + +To see the available configuration options run configure with --help: + +./configure --help + +The required --database option specify the database system you would +like to use. + +The configure script expects the directory where the ODB compiler +binary is installed to be in the executable search path (the PATH +environment variable). If that's not the case, you can use the ODB +configure variable to specify the path to the ODB compiler, for +example: + +./configure ODB=/opt/odb/bin/odb + +If the ODB compiler is not installed and you would like to run it +from its build directory instead, you can use the --with-odb configure +option to specify the build directory, for example: + +./configure --with-odb=/tmp/odb + +The configure script also expects the libodb , libodb-tracer, and +libodb-<database> headers and libraries to be installed in a directory +where the C++ compiler and linker will search for them by default +(normally /usr and /usr/local). If these libraries are installed in +other directories, you can use the CPPFLAGS and LDFLAGS configure +variables to specify their locations, for example: + +./configure CPPFLAGS=-I/opt/libodb/include LDFLAGS=-L/opt/libodb/lib + +If these libraries are not installed and you would like to use their +build directories instead, you can use the --with-libodb, +--with-libodb-tracer, and --with-libodb-<database> configure options +to specify their locations, for example: + +./configure --with-libodb=/tmp/libodb + +For each <database> value the configure script has a set of options in +the form --with-<database>-* that allow you to specify various database +system parameters, such as the login name, password, and database name, +that should be used when running the tests. Run configure with +--help to see the available options for your database. + +As another example, the following configure command uses the specified +C++ compiler and compiles with optimization and without the debug +information: + +./configure CXX=g++-4.5 CXXFLAGS=-O3 + +Once configuration is complete, run make to build the tests: + +make + +Once the build completes successfully you can run the tests using the check +target: + +make check + + +Building on Windows +=================== + +The following build instructions are for Windows using Microsoft Visual +Studio. If you would like to build odb-tests with GCC either using +Cygwin or MinGW, refer to the "Building on UNIX" section above. + +The standard Visual Studio project and solution files are used on this +platform. The provided project files expect the directory where the ODB +compiler binary is installed to be in the executable search path (the +PATH environment variable). They also expect the libodb, libodb-tracer, +and libodb-<database> header and import library directories to be in +the VC++ Directories Include and Library search lists. See the INSTALL +files in the library packages for more information on how to setup the +VC++ Directories. + +There are two ways to build the tests with Visual Studio. After unpacking +the source code archive, you can manually open three solution files located +in the tracer\, common\, and <database>\ directories in theodb-tests package +directory (referred to as odb-tests\ from now on). In the tracer\ directory +the solution file is named tracer-vc<N>.sln. In the common\ directory it +is named common-<database>-vc<N>.sln. And in the <database>\ directory it +is named <database>-vc<N>.sln. Here <N> is the version of Visual Studio +that you are using. Once each solution is open, select the desired build +configuration (Debug or Release) and platform (Win32 or x64) and build the +solution. + +Alternatively, you can use the build.bat batch file located in the +odb-tests\ directory to build all solutions, in all configurations and for +all platforms automatically. The build.bat file has the following command +line interface: + +build.bat <database> <N> [/Build|/Clean|/Rebuild] + +Where <N> is the version of Visual Studio that you are using. If no action +is specified, the default is /Build. + +Once the build completes successfully, you can run all the tests using the +test.bat batch file located in the odb-tests\ directory. + +Before you can run test.bat, you may need to adjust the database system +parameters, such as the login name, password, and database name, that +should be used when running the tests. To do this edit the +<database>.options and <database>-driver.bat files located in the +odb-tests\ directory. Once this is done you can run the tests by +executing the following command from the command prompt: + +test.bat <database> @@ -19,8 +19,8 @@ clean := $(out_base)/.clean $(default): $(addprefix $(out_base)/,$(addsuffix /,$(dirs))) -$(dist): data_dist := GPLv2 LICENSE README version test.bat tester.bat \ -mysql-driver.bat mysql.options +$(dist): data_dist := GPLv2 LICENSE README INSTALL version test.bat \ +tester.bat mysql-driver.bat mysql.options $(dist): exec_dist := bootstrap tester.in $(dist): export extra_dist := $(data_dist) $(exec_dist) build.bat $(dist): export version = $(shell cat $(src_root)/version) |