From a5cd4ef464ad86d81ecfb982ed18b9b9f8a0d38a Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 4 Aug 2014 19:47:48 +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 3c99caf..46409b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ Makefile libopengles-*.so -librustopengles.dummy \ No newline at end of file +librustopengles.dummy +/doc diff --git a/Makefile.in b/Makefile.in index 0e99dd7..321be71 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 ifeq ($(shell uname -s),Darwin) ifeq ($(shell sw_vers | grep -c 10.6),1) @@ -26,6 +29,12 @@ libopengles.dummy: lib.rs $(RUST_SRC) $(EXT_DEPS) opengles-test: lib.rs $(RUST_SRC) $(RUSTC) $(RUSTFLAGS) $< -o $@ --test +.PHONY: doc +doc: $(RUSTDOC_TARGET)/opengles/index.html + +$(RUSTDOC_TARGET)/opengles/index.html: lib.rs $(RUST_SRC) $(EXT_DEPS) + $(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET) + .PHONY: check check: opengles-test ./opengles-test $(TEST)