toml-rs/Makefile

27 lines
462 B
Makefile
Raw Normal View History

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)
$(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)