#!/usr/bin/env sh # Builds documentation for all target triples that we have a registered URL for # in liblibc. This scrapes the list of triples to document from `src/lib.rs` # which has a bunch of `html_root_url` directives we pick up. set -ex TARGETS=$(grep html_root_url src/lib.rs | sed 's/.*".*\/\(.*\)"/\1/'| sed 's/)//') rm -rf target/doc mkdir -p target/doc cp ci/landing-page-head.html target/doc/index.html for target in $TARGETS; do echo "documenting ${target}" rustdoc -o "target/doc/${target}" --target "${target}" src/lib.rs --cfg cross_platform_docs \ --crate-name libc echo "