mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 21:47:46 +00:00
Update README to more accurately reflect build
This commit is contained in:
parent
8ed383941d
commit
902d0414b0
1 changed files with 78 additions and 11 deletions
89
README.md
89
README.md
|
@ -21,9 +21,17 @@ are either old, abandoned, hosted on CVS, written in platform-specific C, etc.
|
||||||
Rust provides a good, platform-agnostic way of writing systems utils that are easy
|
Rust provides a good, platform-agnostic way of writing systems utils that are easy
|
||||||
to compile anywhere, and this is as good a way as any to try and learn it.
|
to compile anywhere, and this is as good a way as any to try and learn it.
|
||||||
|
|
||||||
Rust Version
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
* Rust (`cargo`, `rustc`)
|
||||||
|
* GNU Make (an option to build on Unix and to install on every platform)
|
||||||
|
* CMake (used by Oniguruma, which is required for `expr`)
|
||||||
|
* [Sphinx](http://www.sphinx-doc.org/) (for documentation)
|
||||||
|
* gzip (for installing documentation)
|
||||||
|
|
||||||
|
### Rust Version ###
|
||||||
|
|
||||||
uutils follows Rust's release channels and is tested against stable, beta and nightly.
|
uutils follows Rust's release channels and is tested against stable, beta and nightly.
|
||||||
The current oldest supported version of the Rust compiler is `1.22.0`, but `1.20.0` is
|
The current oldest supported version of the Rust compiler is `1.22.0`, but `1.20.0` is
|
||||||
known to work as well (test failures when compiling with `1.20.0` are due to the tests
|
known to work as well (test failures when compiling with `1.20.0` are due to the tests
|
||||||
|
@ -34,26 +42,63 @@ On both Windows and Redox, only the nightly version is tested currently.
|
||||||
Build Instructions
|
Build Instructions
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
To simply build all available utilities:
|
There are currently two methods to build uutils: GNU Make and Cargo. However,
|
||||||
```
|
while there may be two methods, both systems are required to build on Unix
|
||||||
make
|
(only Cargo is required on Windows).
|
||||||
|
|
||||||
|
First, for both methods, we need to fetch the repository:
|
||||||
|
```bash
|
||||||
|
$ git clone https://github.com/uutils/coreutils
|
||||||
|
$ cd coreutils
|
||||||
```
|
```
|
||||||
|
|
||||||
(on Windows use [MinGW/MSYS](http://www.mingw.org/wiki/MSYS) or `Cygwin` make and make sure you have `rustc` in `PATH`)
|
### Cargo ###
|
||||||
|
|
||||||
|
Building uutils using Cargo is easy because the process is the same as for
|
||||||
|
every other Rust program:
|
||||||
|
```bash
|
||||||
|
# to keep debug information, compile without --release
|
||||||
|
$ cargo build --release
|
||||||
|
```
|
||||||
|
|
||||||
|
If you don't want to build every utility available on your platform into the
|
||||||
|
multicall binary (the Busybox-esque binary), you can also specify which ones
|
||||||
|
you want to build manually. For example:
|
||||||
|
```bash
|
||||||
|
$ cargo build --features "base32 cat echo rm" --no-default-features
|
||||||
|
```
|
||||||
|
|
||||||
|
If you don't even want to build the multicall binary and would prefer to just
|
||||||
|
build the utilities as individual binaries, that is possible too. For example:
|
||||||
|
```bash
|
||||||
|
$ cargo build -p base32 -p cat -p echo -p rm
|
||||||
|
```
|
||||||
|
|
||||||
|
### GNU Make ###
|
||||||
|
|
||||||
|
Building using `make` is a simple process as well.
|
||||||
|
|
||||||
|
To simply build all available utilities:
|
||||||
|
```bash
|
||||||
|
$ make
|
||||||
|
```
|
||||||
|
|
||||||
To build all but a few of the available utilities:
|
To build all but a few of the available utilities:
|
||||||
```
|
```
|
||||||
make SKIP_UTILS='UTILITY_1 UTILITY_2'
|
$ make SKIP_UTILS='UTILITY_1 UTILITY_2'
|
||||||
```
|
```
|
||||||
|
|
||||||
To build only a few of the available utilities:
|
To build only a few of the available utilities:
|
||||||
```
|
```
|
||||||
make UTILS='UTILITY_1 UTILITY_2'
|
$ make UTILS='UTILITY_1 UTILITY_2'
|
||||||
```
|
```
|
||||||
|
|
||||||
Installation Instructions
|
Installation Instructions
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
Unfortunately, due to limitations with Cargo, uutils requires `make` to
|
||||||
|
install.
|
||||||
|
|
||||||
To install all available utilities:
|
To install all available utilities:
|
||||||
```
|
```
|
||||||
make install
|
make install
|
||||||
|
@ -81,12 +126,15 @@ make MULTICALL=y install
|
||||||
|
|
||||||
Set install parent directory (default value is /usr/local):
|
Set install parent directory (default value is /usr/local):
|
||||||
```
|
```
|
||||||
|
# DESTDIR is also supported
|
||||||
make PREFIX=/my/path install
|
make PREFIX=/my/path install
|
||||||
```
|
```
|
||||||
|
|
||||||
Uninstallation Instructions
|
Uninstallation Instructions
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
Likewise, uninstalling requires `make`.
|
||||||
|
|
||||||
To uninstall all utilities:
|
To uninstall all utilities:
|
||||||
```
|
```
|
||||||
make uninstall
|
make uninstall
|
||||||
|
@ -104,12 +152,30 @@ make MULTICALL=y uninstall
|
||||||
|
|
||||||
To uninstall from a custom parent directory:
|
To uninstall from a custom parent directory:
|
||||||
```
|
```
|
||||||
|
# DESTDIR is also supported
|
||||||
make PREFIX=/my/path uninstall
|
make PREFIX=/my/path uninstall
|
||||||
```
|
```
|
||||||
|
|
||||||
Test Instructions
|
Test Instructions
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
Testing can be done using either Cargo or `make`.
|
||||||
|
|
||||||
|
### Cargo ###
|
||||||
|
|
||||||
|
Just like with building, we follow the standard procedure for testing using
|
||||||
|
Cargo:
|
||||||
|
```bash
|
||||||
|
$ cargo test
|
||||||
|
```
|
||||||
|
|
||||||
|
If you would prefer to test a select few utilities:
|
||||||
|
```bash
|
||||||
|
$ cargo test --features "chmod mv tail" --no-default-features
|
||||||
|
```
|
||||||
|
|
||||||
|
### GNU Make ###
|
||||||
|
|
||||||
To simply test all available utilities:
|
To simply test all available utilities:
|
||||||
```
|
```
|
||||||
make test
|
make test
|
||||||
|
@ -130,10 +196,11 @@ To include tests for unimplemented behavior:
|
||||||
make UTILS='UTILITY_1 UTILITY_2' SPEC=y test
|
make UTILS='UTILITY_1 UTILITY_2' SPEC=y test
|
||||||
```
|
```
|
||||||
|
|
||||||
Run busybox tests
|
Run Busybox Tests
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
This testing functionality is only available on *nix operating systems
|
This testing functionality is only available on *nix operating systems and
|
||||||
|
requires `make`.
|
||||||
|
|
||||||
To run busybox's tests for all utilities for which busybox has tests
|
To run busybox's tests for all utilities for which busybox has tests
|
||||||
```
|
```
|
||||||
|
@ -153,7 +220,7 @@ make UTILS='UTILITY_1 UTILITY_2' RUNTEST_ARGS='-v' busytest
|
||||||
Contribute
|
Contribute
|
||||||
----------
|
----------
|
||||||
|
|
||||||
To contribute to coreutils, please see [CONTRIBUTING](CONTRIBUTING.md).
|
To contribute to uutils, please see [CONTRIBUTING](CONTRIBUTING.md).
|
||||||
|
|
||||||
Utilities
|
Utilities
|
||||||
---------
|
---------
|
||||||
|
@ -161,7 +228,7 @@ Utilities
|
||||||
| Done | Semi-Done | To Do |
|
| Done | Semi-Done | To Do |
|
||||||
|-----------|-----------|--------|
|
|-----------|-----------|--------|
|
||||||
| arch | cp | chcon |
|
| arch | cp | chcon |
|
||||||
| base32 | expr | csplit |
|
| base32 | expr | csplit |
|
||||||
| base64 | install | dd |
|
| base64 | install | dd |
|
||||||
| basename | ls | df |
|
| basename | ls | df |
|
||||||
| cat | more | join |
|
| cat | more | join |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue