mirror of
https://github.com/uutils/coreutils.git
synced 2025-07-07 21:45:01 +00:00
Add windows feature and make unix imply generic
This commit is contained in:
parent
179de609b5
commit
63f1537838
3 changed files with 6 additions and 5 deletions
|
@ -35,7 +35,10 @@ unix = [
|
|||
"uptime",
|
||||
"users",
|
||||
"who",
|
||||
|
||||
"generic"
|
||||
]
|
||||
windows = ["generic"]
|
||||
# Feature "fuchsia" contains the exclusive list of utilities
|
||||
# that can be compiled and run on Fuchsia. Should be built
|
||||
# with --no-default-features when selecting this feature.
|
||||
|
@ -149,7 +152,7 @@ redox = [
|
|||
]
|
||||
test_unimplemented = []
|
||||
nightly = []
|
||||
default = ["generic", "unix"]
|
||||
default = ["unix"]
|
||||
|
||||
[workspace]
|
||||
|
||||
|
|
|
@ -33,8 +33,6 @@ Requirements
|
|||
|
||||
* Rust (`cargo`, `rustc`)
|
||||
* 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)
|
||||
* gzip (for installing documentation)
|
||||
|
||||
|
@ -72,7 +70,7 @@ Unix-like platforms at the moment, to build on Windows, you must do the
|
|||
following:
|
||||
```bash
|
||||
# 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
|
||||
|
|
2
build.rs
2
build.rs
|
@ -16,7 +16,7 @@ pub fn main() {
|
|||
if val == "1" && key.starts_with(feature_prefix) {
|
||||
let krate = key[feature_prefix.len()..].to_lowercase();
|
||||
match krate.as_ref() {
|
||||
"default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic"
|
||||
"default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic" | "windows"
|
||||
| "nightly" | "test_unimplemented" => continue,
|
||||
_ => {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue