From b9de1811d78554659f0f720166331ca7fa73f8c8 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 4 Aug 2014 19:48:35 +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 c3ece15..253753c 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 @@ libsharegl.dummy: lib.rs $(RUST_SRC) $(EXT_DEPS) sharegl-test: lib.rs $(RUST_SRC) $(RUSTC) $(RUSTFLAGS) $< -o $@ --test +.PHONY: doc +doc: $(RUSTDOC_TARGET)/sharegl/index.html + +$(RUSTDOC_TARGET)/sharegl/index.html: lib.rs $(RUST_SRC) $(EXT_DEPS) + $(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET) + .PHONY: check check: sharegl-test ./sharegl-test $(TEST)