1Building and Installing Cgreen
2==============================
3
4This document is incomplete. ??? are placeholders.
5
6There are several ways to use Cgreen:
7
81) You want to write some tests for a personal project, but don't need to ship
9   the test suite with the product, or you just want to try out CGreen.
102) You want to write some tests that will be used by other developers. This
11   is the normal way to use Cgreen.
123) You want to ship working tests with a product and want to bundle Cgreen
13   as the test runner.
144) You are pulling Cgreen directly from subversion on Sourceforge:
15   https://cgreen.svn.sourceforge.net/svnroot/cgreen/trunk/cgreen
16
17We'll walk you through these in order...
18
191) So you want to write a test quickly.
20
21As a user wanting to write some quick tests, the quickest way is to
22download the latest tarball and run "make" from inside the unpacked directory.
23You can go "make test" to confirm that Cgreen is working correctly.
24
25You will see a cgreen.h and both a cgreen shared object or DLL, and a static
26library for your system.
27
28Note: currently the header is stored further into the tree at
29include/cgreen/cgreen.h, but we'll add a symlink soon ???.
30
31Include the header and link the library as you normally would.
32
332) Cgreen needs to be installed to be usable by everyone.
34
35This is the same as scenario 1, but just add a "make install" step
36once finished. The Cgreen header should just be available through...
37
38#include <cgreen.h>
39
40...and adding -Icgreen should be enough to link under gcc.
41
423) ???
43
444) You will have to carry out some additional steps if you work straight off
45of a Subversion checkout.
46
47We are using the CMake (www.cmake.org) build system. The following steps
48are called "out-of-source building", because we will build all the project
49files outside of the sources directory (why???).
50
51First the build directory:
52    $ mkdir cgreen-build
53    $ cd cgreen-build
54Within this new directory, we create the Makefile
55    $ cmake ../cgreen
56We then get the following make targets:
57    $make
58    $make test
59    $make packages
60To build docs, first read the file docs/README, run:
61    $ cmake ../cgreen -DENABLE_DOCS=1
62    $make html
63To build the html website:
64    $ cmake ../cgreen -DENABLE_WEBSITE=1
65    $ make bundled-html
66
67Note ???: Most of these steps do not currently work :(.
68
69