forked from neon-bindings/neon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (22 loc) · 850 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
MARKDOWN_FILES = $(wildcard doc/*.md)
HTML_FILES = $(MARKDOWN_FILES:doc/%.md=target/doc/%.html)
all: doc
publish: doc
cd target/doc && surge
doc: neon_api neon_build_api neon_runtime_api $(HTML_FILES) target/doc/rust.css target/doc/CNAME
clean:
rm -rf target/doc
neon_api:
cargo doc
neon_build_api:
cd crates/neon_build && cargo doc
cp -R crates/neon-build/target/doc/neon_build ./target/doc
neon_runtime_api:
cd crates/neon-runtime && cargo doc
cp -R crates/neon-runtime/target/doc/neon_runtime ./target/doc/
target/doc/%.html: doc/%.md
rustdoc --markdown-playground-url='https://play.rust-lang.org' --markdown-css rust.css $< --output=target/doc
target/doc/rust.css:
curl -s https://raw.githubusercontent.com/rust-lang/rust/master/src/doc/rust.css > target/doc/rust.css
target/doc/CNAME: doc/CNAME
cp doc/CNAME target/doc/CNAME