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: