Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.

Commit 6b5af96

Browse files
committed
Generate documentation with rustdoc
1 parent 50afbaa commit 6b5af96

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/doc

Makefile.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ VPATH=%VPATH%
33
RUSTC ?= rustc
44
RUSTFLAGS ?=
55
EXT_DEPS ?=
6+
RUSTDOC ?= rustdoc
7+
RUSTDOC_FLAGS ?=
8+
RUSTDOC_TARGET ?= doc
69

710
RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs')
811

@@ -16,6 +19,12 @@ librust-layers.dummy: lib.rs $(RUST_SRC) $(EXT_DEPS)
1619
rust-layers-test: lib.rs $(RUST_SRC)
1720
$(RUSTC) $(RUSTFLAGS) $< -o $@ --test
1821

22+
.PHONY: doc
23+
doc: $(RUSTDOC_TARGET)/layers/index.html
24+
25+
$(RUSTDOC_TARGET)/layers/index.html: lib.rs $(RUST_SRC) $(EXT_DEPS)
26+
$(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET)
27+
1928
.PHONY: check
2029
check: rust-layers-test
2130
./rust-layers-test $(TEST)

0 commit comments

Comments
 (0)