From aa718dcd3a14277ecfd51af16d5e352c6efa124b Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 4 Aug 2014 19:00:22 +0100 Subject: [PATCH] Generate documentation with rustdoc --- .gitignore | 3 ++- Makefile.in | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e4e5f6c..27c3218 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -*~ \ No newline at end of file +*~ +/doc diff --git a/Makefile.in b/Makefile.in index e2f12b4..6e1c393 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2,6 +2,9 @@ VPATH=%VPATH% RUSTC ?= rustc RUSTFLAGS ?= +RUSTDOC ?= rustdoc +RUSTDOC_FLAGS ?= +RUSTDOC_TARGET ?= doc RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs') @@ -19,6 +22,12 @@ xlib-test: lib.rs $(RUST_SRC) check: xlib-test ./xlib-test $(TEST) +.PHONY: doc +doc: $(RUSTDOC_TARGET)/xlib/index.html + +$(RUSTDOC_TARGET)/xlib/index.html: lib.rs $(RUST_SRC) + $(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET) + .PHONY: clean clean: rm -f *.o *.a *.so *.dylib *.rlib *.dll *.dummy *-test