summaryrefslogtreecommitdiffstats
path: root/vendor/petgraph/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /vendor/petgraph/Makefile
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/petgraph/Makefile')
-rw-r--r--vendor/petgraph/Makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/vendor/petgraph/Makefile b/vendor/petgraph/Makefile
new file mode 100644
index 000000000..7cd942c6f
--- /dev/null
+++ b/vendor/petgraph/Makefile
@@ -0,0 +1,38 @@
+DOCCRATES = petgraph fixedbitset
+
+# deps to delete the generated docs
+RMDOCS =
+
+FEATURES = unstable
+
+VERSIONS = $(patsubst %,target/VERS/%,$(DOCCRATES))
+
+docs: mkdocs mksvgs subst $(RMDOCS)
+
+# https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html
+$(VERSIONS): Cargo.toml
+ mkdir -p $(@D)
+ cargo pkgid $(@F) | sed -e "s/.*#\(\|.*:\)//" > "$@"
+
+$(DOCCRATES): %: target/VERS/%
+ # Put in the crate version into the docs
+ find ./doc/$@ -name "*.html" -exec sed -i -e "s/<title>\(.*\) - Rust/<title>$@ $(shell cat $<) - \1 - Rust/g" {} \;
+
+subst: $(DOCCRATES)
+
+mkdocs: Cargo.toml
+ cargo doc --features=$(FEATURES)
+ rm -rf ./doc
+ cp -r ./target/doc ./doc
+ - cat ./custom.css >> doc/main.css
+
+$(RMDOCS): mkdocs
+ rm -r ./doc/$@
+ sed -i "/searchIndex\['$@'\]/d" doc/search-index.js
+
+mksvgs: mkdocs graph-example.dot
+ dot -Tsvg < ./graph-example.dot > graph-example.svg
+ mv graph-example.svg ./doc/petgraph/graph/
+
+
+.PHONY: docs mkdocs mksvgs subst $(DOCCRATES) $(RMDOCS)