From 41fa53d78296d35e8190dcf1514a58e9ca98c02f Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 4 Aug 2014 19:25:44 +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 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