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)