From 386b96bcea0dca31be37b0651ce5d354feac7178 Mon Sep 17 00:00:00 2001 From: "N.E" Date: Wed, 25 Aug 2021 12:46:29 -0400 Subject: [PATCH] Rebuild if AVR_CPU_FREQUENCY_HZ environment variable changes --- .gitignore | 1 + Cargo.toml | 2 +- build.rs | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 build.rs diff --git a/.gitignore b/.gitignore index 96ef6c0..ff0d847 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target +/.vscode Cargo.lock diff --git a/Cargo.toml b/Cargo.toml index 61bce0a..29c93da 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "avr-config" -version = "2.0.1" +version = "2.0.2" authors = ["Dylan McKay "] edition = "2018" diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..56e558c --- /dev/null +++ b/build.rs @@ -0,0 +1,4 @@ +fn main() { + #[cfg(feature = "cpu-frequency")] + println!("cargo:rerun-if-env-changed=AVR_CPU_FREQUENCY_HZ"); +}