Skip to content

Commit

Permalink
fix build.rs so we can build on docs.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
eeeebbbbrrrr committed Nov 16, 2020
1 parent 53644db commit 03af3ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pgx-pg-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ impl bindgen::callbacks::ParseCallbacks for IgnoredMacros {
}

fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
if std::env::var("DOCS_RS").unwrap_or("false".into()) == "1" {
return Ok(());
}

// dump the environment for debugging if asked
if std::env::var("PGX_BUILD_VERBOSE").unwrap_or("false".to_string()) == "true" {
for (k, v) in std::env::vars() {
Expand All @@ -67,10 +71,6 @@ fn main() -> Result<(), Box<dyn Error + Send + Sync>> {

let pgx = Pgx::from_config()?;

if std::env::var("DOCS_RS").unwrap_or("false".into()) == "1" {
return Ok(());
}

build_deps::rerun_if_changed_paths(&Pgx::config_toml()?.display().to_string()).unwrap();
build_deps::rerun_if_changed_paths("include/*").unwrap();
build_deps::rerun_if_changed_paths("cshim/pgx-cshim.c").unwrap();
Expand Down

0 comments on commit 03af3ce

Please sign in to comment.