mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-09 01:18:35 +03:00
Add Makefile
This commit is contained in:
parent
6d25a0374a
commit
9394222cc1
1
rust-bindings/rust/.gitignore
vendored
1
rust-bindings/rust/.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
/.idea
|
||||
/tools
|
||||
/*/target
|
||||
**/*.rs.bk
|
||||
|
||||
|
45
rust-bindings/rust/Makefile
Normal file
45
rust-bindings/rust/Makefile
Normal file
@ -0,0 +1,45 @@
|
||||
all: generate-libostree-sys generate-libostree
|
||||
|
||||
.PHONY: update-gir-files
|
||||
|
||||
# tools
|
||||
tools/bin/gir:
|
||||
cargo install --root tools --git https://github.com/gtk-rs/gir.git -- gir
|
||||
|
||||
tools/bin/rustdoc-stripper:
|
||||
cargo install --root tools rustdoc-stripper
|
||||
|
||||
# gir generate
|
||||
gir/%: tools/bin/gir
|
||||
tools/bin/gir -c conf/$*.toml
|
||||
|
||||
generate-libostree-sys: gir/libostree-sys
|
||||
|
||||
generate-libostree: gir/libostree update-docs
|
||||
|
||||
# docs
|
||||
update-docs: tools/bin/gir tools/bin/rustdoc-stripper
|
||||
tools/bin/gir -c conf/libostree.toml -m doc
|
||||
tools/bin/rustdoc-stripper -g -o libostree/vendor.md
|
||||
rm libostree/vendor.md
|
||||
|
||||
# gir file management
|
||||
update-gir-files: \
|
||||
remove-gir-files \
|
||||
gir-files \
|
||||
gir-files/GLib-2.0.gir \
|
||||
gir-files/Gio-2.0.gir \
|
||||
gir-files/GObject-2.0.gir
|
||||
|
||||
remove-gir-files:
|
||||
rm -f gir-files/G*-2.0.gir
|
||||
|
||||
gir-files:
|
||||
mkdir -p gir-files
|
||||
|
||||
%.gir:
|
||||
curl -o $@ -L https://github.com/gtk-rs/gir-files/raw/master/${@F}
|
||||
|
||||
gir-files/OSTree-1.0.gir:
|
||||
echo TODO
|
||||
exit 1
|
Loading…
Reference in New Issue
Block a user