mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
abcf7644a9
Place all rust code under samba/rust, similar to how we organize python code in the samba tree. Signed-off-by: David Mulder <dmulder@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
35 lines
975 B
Rust
35 lines
975 B
Rust
use std::env;
|
|
|
|
fn main() {
|
|
// Re-export the Target OS, so that Himmelblaud has access to this at
|
|
// runtime.
|
|
if &env::var("CARGO_CFG_TARGET_OS").unwrap() != "none" {
|
|
println!(
|
|
"cargo:rustc-env=TARGET_OS={}",
|
|
&env::var("CARGO_CFG_TARGET_OS").unwrap()
|
|
);
|
|
} else {
|
|
println!(
|
|
"cargo:rustc-env=TARGET_OS={}",
|
|
&env::var("CARGO_CFG_TARGET_FAMILY").unwrap()
|
|
);
|
|
}
|
|
println!("cargo:rerun-if-changed-env=TARGET");
|
|
|
|
if let Some(vers) = version::samba_version_string() {
|
|
println!("cargo:rustc-env=CARGO_PKG_VERSION={}", vers);
|
|
}
|
|
println!(
|
|
"cargo:rustc-env=CARGO_PKG_VERSION_MAJOR={}",
|
|
version::SAMBA_VERSION_MAJOR
|
|
);
|
|
println!(
|
|
"cargo:rustc-env=CARGO_PKG_VERSION_MINOR={}",
|
|
version::SAMBA_VERSION_MINOR
|
|
);
|
|
println!(
|
|
"cargo:rustc-env=CARGO_PKG_VERSION_PATCH={}",
|
|
version::SAMBA_VERSION_RELEASE
|
|
);
|
|
}
|