Skip to content

How to build

Antony MECHIN edited this page Apr 5, 2017 · 4 revisions

This page shows how to build Elle.

N.B.: If you just want to give Elle a quick try, you should consider the Docker image infinitd/elle or our tarball for Ubuntu LTS and later.

Clone

Elle is accessible on GitHub at https://github.com/infinit/elle.

If your Git version is 1.6.5 or later.

$ git clone https://github.com/infinit/elle --recursive
$ cd elle

else

$ git clone https://github.com/infinit/elle
$ cd elle
$ git submodule update --init --recursive

N.B.: Elle comes with many submodules. Do not forget to update submodules when you update Elle.

Elle uses Infinit's buildsystem, Drake, which is, for the sake of simplicity, a submodule of Elle.

Build

As mentioned earlier, Elle uses Drake. You can take a look at the drakefile, located at the root of the git repository.

Drake is a buildsystem written in python3. You'll need to install it's dependencies, listed by drake/requirements.txt.

$ sudo pip3 install -r drake/requirements.txt

N.B.: If you don't want Drake dependencies to be installed system-wide, you should consider using Virtualenv.

Buildscript

Elle comes with buildscripts for GNULinux 64-bit, GNULinux 32-bit, macOS and Windows 64-bit (cross-compilation from GNULinux), which define a few elements like the compiler to use, paths to certain resources, environment variables, etc. Those scripts aren't mandatory but can greatly simplify Drake's invocation.

Depending on your platform, it should be as simple as:

$ cd _build/<plateform>
$ ./drake //build -j 4
$ ./drake //check -j 4 # Check everything is functional.

Rules

The drakefile defines rules, that represents list of targets to build.

  • //build: Build Elle, creating libraries (static or shared, depending on your platform)
  • //install: Build Elle and install it at the given prefix (specified by --prefix=<prefix>)
  • //tests: Build Elle's test suite
  • //check: Build and run Elle's test suite
  • //examples: Build examples and run non interactive Elle's examples
  • //docker: Build a Docker image with Elle installed