From 99036a8596ca78b9c36de815bd4b39f050b5e6fd Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 4 Aug 2014 19:37:38 +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 88dd639..a10babf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -7,6 +7,9 @@ AR ?= ar RUSTC ?= rustc RUSTFLAGS += -L . -L ../libhubbub -L ../../libparserutils/libparserutils EXT_DEPS ?= +RUSTDOC ?= rustdoc +RUSTDOC_FLAGS ?= +RUSTDOC_TARGET ?= doc RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs') @@ -20,6 +23,12 @@ libhubbub-servo.dummy: hubbub.rc $(RUST_SRC) $(EXT_DEPS) $(RUSTC) $(RUSTFLAGS) $< --out-dir . -C extra-filename=-servo touch $@ +.PHONY: doc +doc: $(RUSTDOC_TARGET)/hubbub/index.html + +$(RUSTDOC_TARGET)/hubbub/index.html: hubbub.rc $(RUST_SRC) $(EXT_DEPS) + $(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET) + .PHONY: check check: