From 6b5af96a1e95db3c4083a411855a592ac23a6fb4 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 4 Aug 2014 19:45:51 +0100 Subject: [PATCH] Generate documentation with rustdoc --- .gitignore | 1 + Makefile.in | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5df5866 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/doc diff --git a/Makefile.in b/Makefile.in index e744ef7..83b6592 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3,6 +3,9 @@ VPATH=%VPATH% RUSTC ?= rustc RUSTFLAGS ?= EXT_DEPS ?= +RUSTDOC ?= rustdoc +RUSTDOC_FLAGS ?= +RUSTDOC_TARGET ?= doc RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs') @@ -16,6 +19,12 @@ librust-layers.dummy: lib.rs $(RUST_SRC) $(EXT_DEPS) rust-layers-test: lib.rs $(RUST_SRC) $(RUSTC) $(RUSTFLAGS) $< -o $@ --test +.PHONY: doc +doc: $(RUSTDOC_TARGET)/layers/index.html + +$(RUSTDOC_TARGET)/layers/index.html: lib.rs $(RUST_SRC) $(EXT_DEPS) + $(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET) + .PHONY: check check: rust-layers-test ./rust-layers-test $(TEST)