toml-rs/Makefile

27 lines
465 B
Makefile
Raw Normal View History

2014-06-20 19:06:17 -05:00
RUSTC := rustc
2014-06-20 19:30:08 -05:00
RUSTDOC := rustdoc
2014-06-20 19:06:17 -05:00
BUILD := build
LIB := $(BUILD)/$(shell $(RUSTC) --crate-file-name src/toml.rs)
TEST := $(BUILD)/tomltest
all: $(LIB)
-include $(BUILD)/toml.d
-include $(BUILD)/tomltest.d
$(LIB): src/toml.rs
@mkdir -p $(@D)
$(RUSTC) -O $< --out-dir $(@D) --dep-info
2014-06-20 19:30:08 -05:00
check: $(TEST) doctest
2014-06-20 19:06:17 -05:00
$(TEST)
$(TEST): src/toml.rs
$(RUSTC) $< --test -o $@ --dep-info
2014-06-20 19:30:08 -05:00
doctest: $(LIB)
$(RUSTDOC) --test -L $(BUILD) src/toml.rs
2014-06-20 19:06:17 -05:00
clean:
rm -rf $(BUILD)