Rewrite how to build imag
This commit is contained in:
parent
5f15c21d30
commit
e8f61dd03b
1 changed files with 23 additions and 18 deletions
41
README.md
41
README.md
|
@ -36,7 +36,7 @@ files.
|
||||||
|
|
||||||
Here goes how to try `imag` out.
|
Here goes how to try `imag` out.
|
||||||
|
|
||||||
`imag` is a _suite_ of tools and you can build them individually.
|
`imag` is a _suite/collection_ of tools and you can build them individually.
|
||||||
All subdirectories prefixed with "`libimag"` are libraries for the respective
|
All subdirectories prefixed with "`libimag"` are libraries for the respective
|
||||||
binaries.
|
binaries.
|
||||||
All subdirectories prefixed with `"imag-"` are binaries and compiling them will
|
All subdirectories prefixed with `"imag-"` are binaries and compiling them will
|
||||||
|
@ -44,24 +44,29 @@ give you a commandline application.
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
By now, there are several targets in the Makefile, fulfilling following roles:
|
We use `make` to automate the build process (as `cargo` is not (yet?) able to
|
||||||
|
build several applications at once).
|
||||||
|
Make sure to _not_ include some `-j 8` arguments, as cargo parallelizes the
|
||||||
|
build process on its own. If you parallelize it with make, you end up with a
|
||||||
|
really high load on your system.
|
||||||
|
|
||||||
* `all` is the default and builds every crate in debug mode.
|
There are several targets for each of the sub-crates in the Makefile:
|
||||||
To build a single module, call `make <module>`, for example `make imag-store`.
|
|
||||||
* `release`, as the name implies, builds every module in release mode.
|
| Target | Multi | Purpose | Example |
|
||||||
E.G.: `make imag-store-release` to build "imag-store" in release mode.
|
| :--- | ----- | :--- | :--- |
|
||||||
* `install` will install all commandline modules to the default installation
|
| all | | Build everything, debug mode | `make all` |
|
||||||
root (see `man cargo-install`).
|
| bin | | Build all binaries, debug mode | `make bin` |
|
||||||
To install a single module, run `make <module>-install`,
|
| lib | | Build all libraries, debug mode | `make lib` |
|
||||||
E.G.: `make imag-store-install`
|
| lib-test | | Test all libraries | `make lib-test` |
|
||||||
* `bin`/`lib` are separate targets for either building all binaries or
|
| imag-bin | | Build only the `imag` binary, debug mode | `make imag-bin` |
|
||||||
libraries.
|
| check | * | Run `cargo check` | `make check` |
|
||||||
* `lib-test` runs `cargo test` for all libraries.
|
| clean | * | Remove build artifacts | `make clean` |
|
||||||
For testing a single library, E.G.: `make test-libimagstore`.
|
| install | * | Build everything, release mode, install | `make install` |
|
||||||
* `clean` will run `cargo clean` in every crate.
|
| release | * | Build everything, release mode | `make release` |
|
||||||
For cleaning a single crate, use `make imag-store-clean` for example.
|
| update | * | Run `cargo update` | `make update` |
|
||||||
* to build _only_ the `imag` binary, use the target `imag-bin`
|
|
||||||
(`imag-bin-release` for release build, `imag-bin-clean` for `cargo clean`ing).
|
The `Multi` targets are callable for each sub-crate. For example you can call
|
||||||
|
`make imag-bookmark-check` to run `cargo check` on the `imag-bookmark` subcrate.
|
||||||
|
|
||||||
### Running
|
### Running
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue