aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 46fded5c32953d204c38c22a252c25dd4feccb52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# cleantools
Clean package manager and improved make script

Copyright © 2016 Camil Staps. Licensed under MIT: see the LICENSE file.

**This project is currently still in alpha version.**

## Installation & Configuration

Install the project:

    # pip3 install -e .

Initialise the installation directory and configuration file:

    $ clmgr init [~/.clmgr]

You can further edit `~/.clmgr.cfg`. In particular, it could be useful to set `General.clean_home` to the path to your Clean installation (e.g. `/opt/clean`), so that `clim` will also look in `<clean_home>/lib`.

## Usage

### Library management using `clmgr`

To install a new library:

    $ clmgr clone camilstaps/CleanLogic

By default, `clmgr` will clone from GitHub using HTTPS. To give an absolute path, specify `--abs`.

    $ clmgr clone --abs https://github.com/camilstaps/CleanLogic

By default, `clmgr` will intelligently guess the name of the library. If you want to specify the local name, add an argument:

    $ clmgr clone --abs https://github.com/camilstaps/CleanLogic MyLocalName

### Building Clean projects with `clim`

`clim` is an improved Clean make version. It is a wrapper for `clm`, and therefore specific to unix-like environments. In its simplest form, you can use it as a `clm` substitute:

    $ clim -clm [clm arguments]

By adding `-W` ('with'), you can add libraries installed with `clmgr` to `clm`'s include path:

    $ clim -W CleanLogic -clm [clm arguments]
    $ clim -W LibA LibB -clm [clm arguments]

To see a list of paths `clim` looks in when given `-W` arguments, run `clmgr echo search_path`.

## Todo

 - Improved error handling.
 - Allow libraries to specify their include paths in a configuration file.
 - Allow libraries to add to the system path (e.g. for [iClean](https://github.com/camilstaps/iClean))