Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
Rewrite makefile to use cargo install
Browse files Browse the repository at this point in the history
This makes gir build work regardless of any `target-dir` overrides.

[skip ci]
  • Loading branch information
gkoz committed Apr 19, 2016
1 parent 0912f29 commit 393dc3b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
GIR = gir/target/release/gir
GTK_GIR = gir-files/Gtk-3.0.gir
GIR = gir/target/bin/gir
GIR_SRC = gir/Cargo.toml gir/Cargo.lock gir/build.rs $(shell find gir/src -name '*.rs')
GIR_FILES = gir-files/Gtk-3.0.gir

# Run `gir` generating the bindings
gir : src/auto/mod.rs

src/auto/mod.rs : Gir.toml $(GIR) $(GTK_GIR)
src/auto/mod.rs : Gir.toml $(GIR) $(GIR_FILES)
$(GIR) -c Gir.toml

$(GIR) : gir/Cargo.toml gir/Cargo.lock gir/build.rs $(shell find gir/src -name '*.rs')
cd gir && cargo build --release
$(GIR) : $(GIR_SRC)
rm -f gir/target/bin/gir
cargo install --path gir --root gir/target
rm -f gir/target/.crates.toml

gir/Cargo.toml $(GTK_GIR) :
$(GIR_SRC) $(GIR_FILES) :
git submodule update --init

0 comments on commit 393dc3b

Please sign in to comment.