2014-06-26 21:27:08 -05:00
|
|
|
RUSTC ?= rustc
|
|
|
|
RUSTDOC ?= rustdoc
|
|
|
|
BUILD ?= build
|
2014-07-07 08:24:37 -05:00
|
|
|
LIB := $(BUILD)/$(shell $(RUSTC) --print-file-name src/toml.rs)
|
2014-06-20 19:06:17 -05:00
|
|
|
TEST := $(BUILD)/tomltest
|
|
|
|
|
|
|
|
all: $(LIB)
|
|
|
|
|
|
|
|
-include $(BUILD)/toml.d
|
|
|
|
-include $(BUILD)/tomltest.d
|
|
|
|
|
|
|
|
$(LIB): src/toml.rs
|
|
|
|
@mkdir -p $(@D)
|
2014-06-22 01:35:49 -05:00
|
|
|
$(RUSTC) $< --out-dir $(@D) --dep-info
|
2014-06-20 19:06:17 -05:00
|
|
|
|
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)
|