Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better explain build and installation #18

Merged
merged 2 commits into from Jul 30, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -29,23 +29,63 @@ As such, it contains:
- an implementation of Tarjan's algorithm for finding components and
their topological sort.

## Installing

This library is installed from source. You will need to already have
installed `git`, the GNU autoconf tools, and a C compiler. Currently
you need to have installed
[Cutter](http://cutter.sourceforge.net/reference/install.html)
as well. (There is
[an issue](https://github.com/wbreeze/davenport/issues/16)
to remove that requirement.)
Given those:

- Check-out the source, `git clone https://github.com/wbreeze/davenport.git`
- Change to the resulting `davenport` directory, `cd davenport`
- Generate the `configure` file, `autoreconf --install`
- Run the `configure` file, `./configure`
- Run the installation script as root, `make install`

On some systems, including Debian and Ubuntu Linux, you must now

- Refresh the shared library loader as root, `ldconfig /usr/local/lib`

### I don't have root access

One option is to have someone who does install it for you.
Another (untested) option, assuming most of the basic requirements,
such as `git`, `autoconf`, and a C compiler are installed on the system,
is to install it locally and use the `LD_LIBRARY_PATH` environment
variable to lead the linker to the library:

```
> mkdir -p ${HOME}/local
> export LOCAL_LIBS=${HOME}/local
> autoreconf --install
> ./configure --prefix=$LOCAL_LIBS
> make install
> export LD_LIBRARY_PATH=${LOCAL_LIBS}/lib/:${LD_LIBRARY_PATH}
```

Consider putting the last export into your shell startup.
You will probably have to do something similar first, to install the
Cutter library. It will be a pain. There's a question and answer
about installing libraries locally
[at SuperUser](https://superuser.com/q/324613).

## Building

This follows the GNU AutoConf convention. From the root of the source tree
(e.g. ~/Davenport):
- `./configure`
- `make`
This follows the GNU AutoConf convention. With the exception of the
`make` command, the process is the same as Installing (above).
For the `make` command, just type "make" rather than "make install".

To run tests:
- `cd test` (optional)
- `make check`

### Development

Use:
- `autoconf --install`
- `./configure`
- `make`
Build as above

To see the cutter output from the tests, either:
- `make check`
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.