Building and Installing Cgreen
==============================

This document is incomplete. ??? are placeholders.

There are several ways to use Cgreen:

1) You want to write some tests for a personal project, but don't need to ship
   the test suite with the product, or you just want to try out CGreen.
2) You want to write some tests that will be used by other developers. This
   is the normal way to use Cgreen.
3) You want to ship working tests with a product and want to bundle Cgreen
   as the test runner.
4) You are pulling Cgreen directly from subversion on Sourceforge:
   https://cgreen.svn.sourceforge.net/svnroot/cgreen/trunk/cgreen

We'll walk you through these in order...

1) So you want to write a test quickly.

As a user wanting to write some quick tests, the quickest way is to
download the latest tarball and run "make" from inside the unpacked directory.
You can go "make test" to confirm that Cgreen is working correctly.

You will see a cgreen.h and both a cgreen shared object or DLL, and a static
library for your system.

Note: currently the header is stored further into the tree at
include/cgreen/cgreen.h, but we'll add a symlink soon ???.

Include the header and link the library as you normally would.

2) Cgreen needs to be installed to be usable by everyone.

This is the same as scenario 1, but just add a "make install" step
once finished. The Cgreen header should just be available through...

#include <cgreen.h>

...and adding -Icgreen should be enough to link under gcc.

3) ???

4) You will have to carry out some additional steps if you work straight off
of a Subversion checkout.

We are using the CMake (www.cmake.org) build system. The following steps
are called "out-of-source building", because we will build all the project
files outside of the sources directory (why???).

First the build directory:
    $ mkdir cgreen-build
    $ cd cgreen-build
Within this new directory, we create the Makefile
    $ cmake ../cgreen
We then get the following make targets:
    $make
    $make test
    $make packages
To build docs, first read the file docs/README, run:
    $ cmake ../cgreen -DENABLE_DOCS=1
    $make html
To build the html website:
    $ cmake ../cgreen -DENABLE_WEBSITE=1
    $ make bundled-html

Note ???: Most of these steps do not currently work :(.

