Skip to content

Commit

Permalink
Merge pull request #2187 from reaperhulk/fix-again
Browse files Browse the repository at this point in the history
don't emit rerun-if-changed unless the path exists and is readable
  • Loading branch information
alex committed Feb 22, 2024
2 parents 3439059 + d5e6fb5 commit 9f29412
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions openssl-sys/build/main.rs
Expand Up @@ -82,9 +82,11 @@ fn main() {
// rerun-if-changed causes openssl-sys to rebuild if the openssl include
// dir has changed since the last build. However, this causes a rebuild
// every time when vendoring so we disable it.
#[cfg(not(feature = "vendored"))]
if let Some(printable_include) = include_dir.join("openssl").to_str() {
println!("cargo:rerun-if-changed={}", printable_include);
let potential_path = include_dir.join("openssl");
if potential_path.exists() && !cfg!(feature = "vendored") {
if let Some(printable_include) = potential_path.to_str() {
println!("cargo:rerun-if-changed={}", printable_include);
}
}

if !lib_dirs.iter().all(|p| p.exists()) {
Expand Down

0 comments on commit 9f29412

Please sign in to comment.