diff --git a/.cargo/config.toml b/.cargo/config.toml index 33eb2be52b4..d409506399e 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,8 +1,11 @@ +# Note: keep in mind that this file is completely ignored in several use-cases +# like e.g. out-of-tree builds ( https://github.com/rust-lang/cargo/issues/2930 ). +# For this reason this file should be avoided as much as possible when there are alternatives. + [target.x86_64-unknown-redox] linker = "x86_64-unknown-redox-gcc" [env] -PROJECT_NAME_FOR_VERSION_STRING = "uutils coreutils" # See feat_external_libstdbuf in src/uu/stdbuf/Cargo.toml LIBSTDBUF_DIR = "/usr/local/libexec/coreutils" diff --git a/src/uucore/src/lib/lib.rs b/src/uucore/src/lib/lib.rs index 6cebe5e3c45..cde28863946 100644 --- a/src/uucore/src/lib/lib.rs +++ b/src/uucore/src/lib/lib.rs @@ -205,18 +205,10 @@ macro_rules! bin { /// /// The generated string has the format `() `, for /// example: "(uutils coreutils) 0.30.0". clap will then prefix it with the util name. -/// -/// To use this macro, you have to add `PROJECT_NAME_FOR_VERSION_STRING = ""` to the -/// `[env]` section in `.cargo/config.toml`. #[macro_export] macro_rules! crate_version { () => { - concat!( - "(", - env!("PROJECT_NAME_FOR_VERSION_STRING"), - ") ", - env!("CARGO_PKG_VERSION") - ) + concat!("(uutils coreutils) ", env!("CARGO_PKG_VERSION")) }; }