Merge pull request #8360 from Ecordonnier/eco/fix-out-of-tree-build

remove PROJECT_NAME_FOR_VERSION_STRING
This commit is contained in:
Daniel Hofstetter
2025-07-21 10:19:54 +02:00
committed by GitHub
2 changed files with 5 additions and 10 deletions
+4 -1
View File
@@ -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"
+1 -9
View File
@@ -205,18 +205,10 @@ macro_rules! bin {
///
/// The generated string has the format `(<project name>) <version>`, 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 = "<project name>"` 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"))
};
}