From 680ed110389fbb99ead8784725a027b499f7aae9 Mon Sep 17 00:00:00 2001 From: Nicolas Viennot Date: Mon, 14 Mar 2022 21:59:39 -0400 Subject: [PATCH] Rebuild when the chip definition changes --- stm32-metapac/build.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stm32-metapac/build.rs b/stm32-metapac/build.rs index 44c10ece..4a852255 100644 --- a/stm32-metapac/build.rs +++ b/stm32-metapac/build.rs @@ -60,4 +60,13 @@ fn main() { ); println!("cargo:rerun-if-changed=build.rs"); + + // When the stm32-data chip's JSON changes, we must rebuild + println!( + "cargo:rerun-if-changed={}/chips/{}.json", + data_dir.display(), + chip_name + ); + + println!("cargo:rerun-if-changed={}/registers", data_dir.display()); }