diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..764e6f4 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ + +docs: VERSION + cargo doc --no-deps + rm -rf ./doc + cp -r ./target/doc ./doc + # Put in the crate version into the docs + find ./doc -name "*.html" -exec sed -i -e "s/\(.*\) - Rust/<title>$(shell cat VERSION) - \1 - Rust/g" {} \; + +VERSION: Cargo.toml + cargo pkgid | sed -e "s/.*\/\(.*\)#\(.*\)/\1 - \2/" > $@ + +.PHONY: docs