f38979def12343a4505f087edf490648e85efb1e
27: Clarify purpose of rerun-if-changed in build.rs r=japaric a=adamgreig
The current `build.rs` contains
```rust
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-changed=memory.x");
```
This causes the build script to be re-run if (and *only if*) `build.rs` or `memory.x` change. The line for `build.rs` is redundant: the Cargo guide [says](https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script) the build script is always rerun when `build.rs` changes, so we can drop that line.
The remaining line caused me a bit of confusion when adding other functionality to my project's build script, before I realised it tells Cargo to *only* rerun the build script when `memory.x` changes, as opposed to the default behaviour which is to rerun it on every build. The comment helps clarify the point of this line, so if users add other functionality to their build scripts it is hopefully easier to notice.
Co-authored-by: Adam Greig <adam@adamgreig.com>
cortex-m-quickstart
A template for building applications for ARM Cortex-M microcontrollers
This project is developed and maintained by the Cortex-M team.
Documentation
License
Licensed under either of
-
Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
-
MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Code of Conduct
Contribution to this crate is organized under the terms of the Rust Code of Conduct, the maintainer of this crate, the Cortex-M team, promises to intervene to uphold that code of conduct.
Description
[Embedded Rust Book](https://docs.rust-embedded.org/book/intro/index.html) shenanigans
Languages
Rust
77.2%
Nix
11.7%
GDB
11.1%