Update deps and Makefile
authorCarl Lerche <me@carllerche.com>
Sat, 8 Mar 2014 00:14:57 +0000 (16:14 -0800)
committerCarl Lerche <me@carllerche.com>
Sat, 8 Mar 2014 00:14:57 +0000 (16:14 -0800)
.gitmodules
Makefile
libs/hammer.rs [new submodule]

index cfadd7ca21e4a09e133561fb9a667635673729d3..3d7b2a79a27d0c4b5d4e4a258c1f718abcb8e1de 100644 (file)
@@ -1,3 +1,6 @@
 [submodule "libs/rust-toml"]
        path = libs/rust-toml
        url = https://github.com/mneumann/rust-toml
+[submodule "libs/hammer.rs"]
+       path = libs/hammer.rs
+       url = https://github.com/wycats/hammer.rs.git
index b20c65bed8d4dad6996ba3cb6fc2b162e28eeef0..b1639adb0a8d610915246b89c00c491eec358d78 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,13 @@ RUSTC_TARGET = target
 RUSTC_FLAGS ?= --out-dir $(RUSTC_TARGET) -L $(RUSTC_TARGET)/libs
 
 TOML_LIB := $(shell rustc --crate-file-name libs/rust-toml/src/toml/lib.rs)
+HAMMER_LIB := $(shell rustc --crate-file-name libs/hammer.rs/src/lib.rs)
 
-default: target/cargo-rustc target/cargo-verify-project
+default: dependencies commands
+
+dependencies: target/libs/$(TOML_LIB) target/libs/$(HAMMER_LIB)
+
+commands: target/cargo-rustc target/cargo-verify-project target/cargo-read-manifest
 
 clean:
        rm -rf target
@@ -14,11 +19,18 @@ target/cargo-rustc: target target/libs/$(TOML_LIB) commands/cargo-rustc/main.rs
 target/cargo-verify-project: target target/libs/$(TOML_LIB) commands/cargo-verify-project/main.rs
        rustc commands/cargo-verify-project/main.rs $(RUSTC_FLAGS)
 
-target/libs/$(TOML_LIB): libs/rust-toml/src/toml/lib.rs
+target/cargo-read-manifest: target target/libs/$(TOML_LIB) target/libs/$(HAMMER_LIB) commands/cargo-read-manifest/main.rs
+       rustc commands/cargo-read-manifest/main.rs $(RUSTC_FLAGS)
+
+target/libs/$(TOML_LIB): target libs/rust-toml/src/toml/lib.rs
        cd libs/rust-toml && make
        cp libs/rust-toml/lib/*.rlib target/libs
 
+target/libs/$(HAMMER_LIB): target libs/hammer.rs/src/lib.rs
+       cd libs/hammer.rs && make
+       cp libs/hammer.rs/target/*.rlib target/libs
+
 target:
        mkdir -p $(RUSTC_TARGET)/libs
 
-.PHONY: default clean
+.PHONY: default clean dependencies commands
diff --git a/libs/hammer.rs b/libs/hammer.rs
new file mode 160000 (submodule)
index 0000000..1106718
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 110671804fe9603a3ff25cf5a8e0fc63df846146