1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

Add windows feature and make unix imply generic

This commit is contained in:
Alex Lyon 2019-04-28 16:56:20 -07:00
parent 179de609b5
commit 63f1537838
3 changed files with 6 additions and 5 deletions

View file

@ -35,7 +35,10 @@ unix = [
"uptime", "uptime",
"users", "users",
"who", "who",
"generic"
] ]
windows = ["generic"]
# Feature "fuchsia" contains the exclusive list of utilities # Feature "fuchsia" contains the exclusive list of utilities
# that can be compiled and run on Fuchsia. Should be built # that can be compiled and run on Fuchsia. Should be built
# with --no-default-features when selecting this feature. # with --no-default-features when selecting this feature.
@ -149,7 +152,7 @@ redox = [
] ]
test_unimplemented = [] test_unimplemented = []
nightly = [] nightly = []
default = ["generic", "unix"] default = ["unix"]
[workspace] [workspace]

View file

@ -33,8 +33,6 @@ Requirements
* Rust (`cargo`, `rustc`) * Rust (`cargo`, `rustc`)
* GNU Make (required to build documentation) * GNU Make (required to build documentation)
* CMake (Unix; used by Oniguruma, which is required for `expr`)
* NMake (Windows; used by Oniguruma, which is required for `expr`)
* [Sphinx](http://www.sphinx-doc.org/) (for documentation) * [Sphinx](http://www.sphinx-doc.org/) (for documentation)
* gzip (for installing documentation) * gzip (for installing documentation)
@ -72,7 +70,7 @@ Unix-like platforms at the moment, to build on Windows, you must do the
following: following:
```bash ```bash
# to keep debug information, compile without --release # to keep debug information, compile without --release
$ cargo build --release --no-default-features --features generic $ cargo build --release --no-default-features --features windows
``` ```
If you don't want to build every utility available on your platform into the If you don't want to build every utility available on your platform into the

View file

@ -16,7 +16,7 @@ pub fn main() {
if val == "1" && key.starts_with(feature_prefix) { if val == "1" && key.starts_with(feature_prefix) {
let krate = key[feature_prefix.len()..].to_lowercase(); let krate = key[feature_prefix.len()..].to_lowercase();
match krate.as_ref() { match krate.as_ref() {
"default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic" "default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic" | "windows"
| "nightly" | "test_unimplemented" => continue, | "nightly" | "test_unimplemented" => continue,
_ => {} _ => {}
} }