mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-15 10:51:01 +00:00
Prevent build.rs rerunning unnecessarily on all source changes
This commit is contained in:
@@ -6,6 +6,8 @@ use std::str::{self, FromStr};
|
|||||||
// opening a GitHub issue if your build environment requires some way to enable
|
// opening a GitHub issue if your build environment requires some way to enable
|
||||||
// these cfgs other than by executing our build script.
|
// these cfgs other than by executing our build script.
|
||||||
fn main() {
|
fn main() {
|
||||||
|
println!("cargo:rerun-if-changed=build.rs");
|
||||||
|
|
||||||
let minor = match rustc_minor_version() {
|
let minor = match rustc_minor_version() {
|
||||||
Some(minor) => minor,
|
Some(minor) => minor,
|
||||||
None => return,
|
None => return,
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ use std::str;
|
|||||||
// opening a GitHub issue if your build environment requires some way to enable
|
// opening a GitHub issue if your build environment requires some way to enable
|
||||||
// these cfgs other than by executing our build script.
|
// these cfgs other than by executing our build script.
|
||||||
fn main() {
|
fn main() {
|
||||||
|
println!("cargo:rerun-if-changed=build.rs");
|
||||||
|
|
||||||
let minor = match rustc_minor_version() {
|
let minor = match rustc_minor_version() {
|
||||||
Some(minor) => minor,
|
Some(minor) => minor,
|
||||||
None => return,
|
None => return,
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
println!("cargo:rerun-if-changed=build.rs");
|
||||||
|
println!("cargo:rerun-if-changed=src/mod.rs");
|
||||||
|
|
||||||
// Sometimes on Windows the git checkout does not correctly wire up the
|
// Sometimes on Windows the git checkout does not correctly wire up the
|
||||||
// symlink from serde_derive_internals/src to serde_derive/src/internals.
|
// symlink from serde_derive_internals/src to serde_derive/src/internals.
|
||||||
// When this happens we'll just build based on relative paths within the git
|
// When this happens we'll just build based on relative paths within the git
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ use std::str::{self, FromStr};
|
|||||||
// opening a GitHub issue if your build environment requires some way to enable
|
// opening a GitHub issue if your build environment requires some way to enable
|
||||||
// these cfgs other than by executing our build script.
|
// these cfgs other than by executing our build script.
|
||||||
fn main() {
|
fn main() {
|
||||||
|
println!("cargo:rerun-if-changed=build.rs");
|
||||||
|
|
||||||
let minor = match rustc_minor_version() {
|
let minor = match rustc_minor_version() {
|
||||||
Some(minor) => minor,
|
Some(minor) => minor,
|
||||||
None => return,
|
None => return,
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ fn has_cargo_expand() -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
println!("cargo:rerun-if-changed=build.rs");
|
||||||
|
|
||||||
if cfg!(feature = "expandtest") && has_cargo_expand() {
|
if cfg!(feature = "expandtest") && has_cargo_expand() {
|
||||||
println!("cargo:rustc-cfg=expandtest");
|
println!("cargo:rustc-cfg=expandtest");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user