opensmtpd-filter-dkimout/build.rs

18 lines
394 B
Rust
Raw Normal View History

2023-03-26 23:42:16 +02:00
use std::env;
2023-03-27 22:46:50 +02:00
const VARLIBDIR_NAME: &str = "VARLIBDIR";
const VARLIBDIR_VALUE_DEFAULT: &str = "/var/lib/";
2023-03-26 23:42:16 +02:00
fn main() {
2023-04-09 17:21:17 +02:00
// trigger recompilation when a new migration is added
println!("cargo:rerun-if-changed=migrations");
// set the VARLIBDIR env variable
2023-03-27 22:46:50 +02:00
if env::var(VARLIBDIR_NAME).is_err() {
println!(
"cargo:rustc-env={}={}",
VARLIBDIR_NAME, VARLIBDIR_VALUE_DEFAULT
);
2023-03-26 23:42:16 +02:00
}
}