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 0d014e7..d3933c6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -7,6 +7,9 @@ AR ?= ar RUSTC ?= rustc RUSTFLAGS ?= EXT_DEPS ?= +RUSTDOC ?= rustdoc +RUSTDOC_FLAGS ?= +RUSTDOC_TARGET ?= doc RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs') @@ -26,6 +29,12 @@ alert-test: alert.rc $(RUST_SRC) $(EXT_DEPS) check: alert-test ./alert-test +.PHONY: doc +doc: $(RUSTDOC_TARGET)/alert/index.html + +$(RUSTDOC_TARGET)/alert/index.html: alert.rc $(RUST_SRC) $(EXT_DEPS) + $(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET) + .PHONY: clean clean: rm -f *.o *.a *.so *.dylib *.rlib *.dll *.dummy *-test