2016-10-03 00:29:59 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
#
|
|
|
|
# Builds the rustdocs for all of the libraries.
|
|
|
|
#
|
|
|
|
|
2016-12-29 04:33:56 +00:00
|
|
|
# Brings in: ROOT_DIR, EXAMPLES_DIR, LIB_DIR, CODEGEN_DIR, CONTRIB_DIR, DOC_DIR
|
2016-10-03 00:29:59 +00:00
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
source $SCRIPT_DIR/config.sh
|
|
|
|
|
|
|
|
function mk_doc() {
|
|
|
|
local dir=$1
|
2016-10-25 08:20:29 +00:00
|
|
|
local flag=$2
|
2017-04-23 07:03:14 +00:00
|
|
|
pushd $dir > /dev/null 2>&1
|
2016-10-03 00:29:59 +00:00
|
|
|
echo ":: Documenting '${dir}'..."
|
|
|
|
cargo doc --no-deps --all-features
|
2017-04-23 07:03:14 +00:00
|
|
|
popd > /dev/null 2>&1
|
2016-10-03 00:29:59 +00:00
|
|
|
}
|
|
|
|
|
2016-10-03 00:51:35 +00:00
|
|
|
# We need to clean-up beforehand so we don't get all of the dependencies.
|
|
|
|
cargo clean
|
2017-09-05 02:07:21 +00:00
|
|
|
cargo update
|
2016-10-03 00:51:35 +00:00
|
|
|
|
2016-10-03 00:29:59 +00:00
|
|
|
mk_doc $LIB_DIR
|
|
|
|
mk_doc $CODEGEN_DIR
|
2017-04-23 07:03:14 +00:00
|
|
|
mk_doc $CONTRIB_DIR
|
2016-12-22 06:56:58 +00:00
|
|
|
|
|
|
|
# Blank index, for redirection.
|
|
|
|
touch ${DOC_DIR}/index.html
|