Skip to content

Commit

Permalink
Add Makefile and submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
antoyo committed Jul 30, 2017
1 parent 9a77a60 commit c4554e2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "gir"]
path = gir
url = https://github.com/gtk-rs/gir.git
[submodule "gir-files"]
path = gir-files
url = https://github.com/gtk-rs/gir-files.git
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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/WebKit2-4.0.gir

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

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

$(GIR) : $(GIR_SRC)
rm -f gir/target/bin/gir
cargo install --path gir --root gir/target
rm -f gir/target/.crates.toml

$(GIR_SRC) $(GIR_FILES) :
git submodule update --init
1 change: 1 addition & 0 deletions gir
Submodule gir added at 0f7cd6
1 change: 1 addition & 0 deletions gir-files
Submodule gir-files added at 0bcaef

0 comments on commit c4554e2

Please sign in to comment.