Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to fix docs.rs build #277

Merged
merged 1 commit into from
Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ optional = true
# warnings.
no-target-warning = []

# Indicates to the build script that we're building docs, and it can skip
# whatever might not work or is not necessary.
docs = []

# Internal implementation detail. Used by HAL code to determine the exact
# hardware capabilites.
20 = []
Expand Down Expand Up @@ -188,4 +192,4 @@ opt-level = "s"


[package.metadata.docs.rs]
features = ["845"]
features = ["845", "docs"]
10 changes: 10 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ use termion::{color, style};
fn main() -> Result<(), Error> {
let target = Target::read();

// Nothing this build script does after this point is required when
// generating documentation.
//
// In addition, the docs.rs build environment has a read-only file system,
// meaning an attempt to run this build script will fail the whole build for
// no reason.
if cfg!(feature = "docs") {
return Ok(());
}

copy_openocd_config(target)?;
copy_memory_config(target)?;

Expand Down