Skip to content

Latest commit

 

History

History
154 lines (108 loc) · 4.29 KB

MAINTAINER-README

File metadata and controls

154 lines (108 loc) · 4.29 KB

This is the README file for maintainers and subversion users and developers. Do not include this file in the distribution.

Dependencies

All the dependencies mentioned in README, plus…

autoconf

http://www.gnu.org/software/autoconf/

automake

http://www.gnu.org/software/automake/

libtool

http://www.gnu.org/software/libtool/

pkg-config

http://pkg-config.freedesktop.org/

Building, installing, and testing dlvhex

Prerequisites

See README for all the basic tools and libraries needed in order to build dlvhex.

The development tools include:

autotools

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)

Configuration

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.

Build and compiler flags

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.

CXX

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++.

CXXFLAGS

For more pedantic compiler warnings, add `-Weffc++’.

Build

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.

Installation

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.

Testsuite

Execute `make check’ to build an run the testsuite. Note that the testsuite depends on the cppunit library (see also README).

Cleanup

To clean a build, you can choose from a bunch of cleanup targets of the automatically generated Makefiles:

make clean

Removes everything which has been build using `make’, but does not remove the generated flex scanner and bison parser source code.

make distclean

This target removes the compiled objects and generated Makefiles from the build directory. After that, you have to call `configure’ again.

make maintainer-clean

This target removes almost everything in the build directory.

Development

New developers may find http://sourceforge.net/apps/trac/dlvhex/wiki/NewDeveloper helpful.

Distributing the package

There are two make targets which take care of creating a dlvhex source package:

make distcheck

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.

make dist

Creates the package dlvhex-VERSION.tar.gz.