-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
31 lines (26 loc) · 1.09 KB
/
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
.PHONY: docs docs-open docs-private readme readme-check
docs:
RUSTDOCFLAGS="--html-in-header katex-header.html --cfg docsrs" cargo +nightly doc --all-features --no-deps
docs-open:
RUSTDOCFLAGS="--html-in-header katex-header.html --cfg docsrs" cargo +nightly doc --all-features --no-deps --open
docs-private:
RUSTDOCFLAGS="--html-in-header katex-header.html --cfg docsrs" cargo +nightly doc --all-features --no-deps --document-private-items
readme:
cargo rdme -w cggmp21 -r README.md && \
cat README.md \
| sed -E 's/(\/\*.+\*\/)/\1;/' \
| sed -E '/^\[`.+`\]:/d' \
| sed -E 's/\[`([^`]*)`\]\(.+?\)/`\1`/g' \
| sed -E 's/\[`([^`]*)`\]/`\1`/g' \
| perl -ne 's/(?<!!)\[([^\[]+?)\]\([^\(]+?\)/\1/g; print;' \
| sed -E '/^#$$/d' \
| sed -e '/<!-- TOC -->/{r docs/toc-cggmp21.md' -e 'd}' \
> README-2.md && \
mv README-2.md README.md
toc-cggmp21:
echo '<!-- TOC STARTS -->' > docs/toc-cggmp21.md
echo >> docs/toc-cggmp21.md
markdown-toc --no-firsth1 - < README.md >> docs/toc-cggmp21.md
echo >> docs/toc-cggmp21.md
echo >> docs/toc-cggmp21.md
echo '<!-- TOC ENDS -->' >> docs/toc-cggmp21.md