aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-06-20 17:30:08 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-20 17:30:08 -0700
commit3bbf216491b01a72398c26689c9ea14a5810adfc (patch)
treee97a676a9a706b04c9666db1196a36c61d9d35ba /Makefile
parent019cd4122b9198c1706bd70de31be0636cbfda92 (diff)
downloadmilf-rs-3bbf216491b01a72398c26689c9ea14a5810adfc.tar.gz
milf-rs-3bbf216491b01a72398c26689c9ea14a5810adfc.zip
Add documentation and examples
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 80eece3..c06948b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
RUSTC := rustc
+RUSTDOC := rustdoc
BUILD := build
LIB := $(BUILD)/$(shell $(RUSTC) --crate-file-name src/toml.rs)
TEST := $(BUILD)/tomltest
@@ -12,11 +13,14 @@ $(LIB): src/toml.rs
@mkdir -p $(@D)
$(RUSTC) -O $< --out-dir $(@D) --dep-info
-check: $(TEST)
+check: $(TEST) doctest
$(TEST)
$(TEST): src/toml.rs
$(RUSTC) $< --test -o $@ --dep-info
+doctest: $(LIB)
+ $(RUSTDOC) --test -L $(BUILD) src/toml.rs
+
clean:
rm -rf $(BUILD)