1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 20:17:45 +00:00

build: create group features for target systems

This allows a user to create builds with or without the Unix-specific
utilities. Right now the Makefile handles this, but this is needed to
migrate away from make.

To build Unix-specific utilities (default):

cargo build
(or)
cargo build --features unix --no-default-features

To build without the Unix-specific utilities:

cargo build --features generic --no-default-features
This commit is contained in:
Joseph Crail 2015-11-29 17:27:54 -05:00
parent b46050460e
commit a8bb7f4417
2 changed files with 79 additions and 80 deletions

View file

@ -4,85 +4,86 @@ version = "0.0.1"
authors = []
build = "build.rs"
[features]
default = ["all"]
all = [
"base64",
"basename",
"cat",
"chmod",
"chroot",
"cksum",
"comm",
"cp",
"cut",
"dirname",
"du",
"echo",
"env",
"expand",
"expr",
"factor",
"false",
"fmt",
"fold",
"groups",
"hashsum",
"head",
"hostid",
"hostname",
"id",
"kill",
"link",
"ln",
"logname",
"mkdir",
"mkfifo",
"mv",
"nice",
"nl",
"nohup",
"nproc",
"od",
"paste",
"printenv",
"ptx",
"pwd",
"readlink",
"realpath",
"relpath",
"rm",
"rmdir",
"seq",
"shuf",
"sleep",
"sort",
"split",
"stdbuf",
"sum",
"sync",
"tac",
"tail",
"tee",
"test",
"timeout",
"touch",
"tr",
"true",
"truncate",
"tsort",
"tty",
"uname",
"unexpand",
"uniq",
"unlink",
"uptime",
"users",
"wc",
"whoami",
"yes",
unix = [
"chroot",
"du",
"groups",
"hostid",
"hostname",
"id",
"kill",
"logname",
"mkfifo",
"mv",
"nice",
"nohup",
"stdbuf",
"timeout",
"touch",
"tty",
"uname",
"unlink",
"uptime",
"users",
]
generic = [
"base64",
"basename",
"cat",
"chmod",
"cksum",
"comm",
"cp",
"cut",
"dirname",
"echo",
"env",
"expand",
"expr",
"factor",
"false",
"fmt",
"fold",
"hashsum",
"head",
"link",
"ln",
"mkdir",
"nl",
"nproc",
"od",
"paste",
"printenv",
"ptx",
"pwd",
"readlink",
"realpath",
"relpath",
"rm",
"rmdir",
"seq",
"shuf",
"sleep",
"sort",
"split",
"sum",
"sync",
"tac",
"tail",
"tee",
"test",
"tr",
"true",
"truncate",
"tsort",
"unexpand",
"uniq",
"wc",
"whoami",
"yes",
]
default = ["generic", "unix"]
[dependencies]
uucore = { path="src/uucore" }
@ -178,4 +179,3 @@ tempdir="*"
[[bin]]
name="uutils"
path="src/uutils/uutils.rs"