diff --git a/mantis/build.rs b/mantis/build.rs index 2187468..73a0c1a 100644 --- a/mantis/build.rs +++ b/mantis/build.rs @@ -37,6 +37,12 @@ fn main() { println!("cargo:rustc-env=DB_PATH={}", db_dir.display()); println!("cargo:rustc-env=RULE_EVE_PATH={}", suricata_eve_socket.display()); + // Watch output artifacts: if they are missing Cargo treats the path as non-existent + // and unconditionally re-runs this script, which is exactly what we want after a + // git clean, fresh clone, or manual deletion. + println!("cargo:rerun-if-changed={}", ingress_edpf_dir.display()); + println!("cargo:rerun-if-changed={}", egress_edpf_dir.display()); + for item in &[ "src", "public",