This is the README file for maintainers and subversion users and developers. Do not include this file in the distribution.
http://www.gnu.org/software/autoconf/
http://www.gnu.org/software/automake/
http://www.gnu.org/software/libtool/
http://pkg-config.freedesktop.org/
See README for all the basic tools and libraries needed in order to build dlvhex.
The development tools include:
The autotools include pkg-config, autoconf, automake, and libtool. See the installation instructions of the corresponding packages, or just install the native packages provided by your operating system.
In Debian/Ubuntu, you need to install the following packages:
- automake
- autoconf
- pkg-config
- libtool
- libltdl-dev
In MacOS, you need to install a current XCode and the macports and install current versions of the following ports:
- automake
- autoconf
- pkgconfig
- libtool-devel
- boost (>1.43)
Right after a subversion check-put, you need to create the `configure’ script. It is being built using the `bootstrap.sh’ script. Just run
$ ./bootstrap.sh
prior to configuration. This will automagically generate all Makefile.in’s and the `configure’ script with help of the autotools. Right after the bootstrap, run
$ ./configure
possibly with some options or environment variables (see README and the paragraphs below). After its execution, follow the configuration instructions in the README file. If you want to try out several builds with different setup options or even with different libraries and compilers in parallel, just create a directory and configure in there:
$ mkdir build $ cd build $ ../configure
Then run make inside `build’ and you will generate the object code, libraries, binaries, etc. without interfering of the source directory above. You can play around and create different build directories.
You can either globally or locally setup the compiler and compiler flags. For a package-wide setup set CXX and CXXFLAGS during the `configure’ execution. If you want to do a build with another compiler or other compiler-flags, set CXX and CXXFLAGS in the `make’ run.
Set this variable to the C++ compiler you want to use to build dlvhex. You can also use this variable to set some compiler frontends such as `ccache g++’ or `distcc g++’, or even use a different compiler than g++ like clang++.
For more pedantic compiler warnings, add `-Weffc++’.
Invoke `make’ (either in the top-level source directory or inside a build directory):
$ make
This builds the engine and the API libraries. You can parallelize the build buy calling `make’ with option `-j N’, where N is the number of parallel compiler calls.
Invoke
$ sudo make install
to install dlvhex. (If you have configured dlvhex with a user-writable prefix then `make install’ without sudo wrapping should work.) Sometimes it is necessary to run
$ sudo ldconfig
after the first installation to refresh the shared library cache.
Execute `make check’ to build an run the testsuite. Note that the testsuite depends on the cppunit library (see also README).
To clean a build, you can choose from a bunch of cleanup targets of the automatically generated Makefiles:
Removes everything which has been build using `make’, but does not remove the generated flex scanner and bison parser source code.
This target removes the compiled objects and generated Makefiles from the build directory. After that, you have to call `configure’ again.
This target removes almost everything in the build directory.
New developers may find http://sourceforge.net/apps/trac/dlvhex/wiki/NewDeveloper helpful.
There are two make targets which take care of creating a dlvhex source package:
Creates a tarball called dlvhex-VERSION.tar.gz, configures, builds and invokes the testsuite. Afterwards it runs some checks on the fresh package. This is the prefered way for creating a package.
Creates the package dlvhex-VERSION.tar.gz.