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)