2020-07-24 12:19:08 +02:00
GIR_REPO := https://github.com/gtk-rs/gir.git
2022-11-22 09:53:59 -05:00
GIR_VERSION := 0eeebbdf9d4d5a0b0148c7fa055bf961e16e54a0
2021-04-09 15:18:36 +00:00
OSTREE_REPO := ../ostree
2022-03-04 10:35:01 +00:00
OSTREE_VERSION := patch-v2022.2
2021-03-26 20:44:02 +01:00
RUSTDOC_STRIPPER_VERSION := 0.1.17
2019-12-15 14:05:17 +01:00
2019-05-24 21:51:34 +02:00
all : gir
2018-10-09 22:24:06 +02:00
2020-03-31 22:59:04 +02:00
.PHONY : gir gir -report update -gir -files remove -gir -files merge -lgpl -docs ci -build -stages
2018-10-09 22:24:06 +02:00
2018-10-18 19:03:03 +02:00
# -- gir generation --
2018-10-20 11:59:54 +02:00
target/tools/bin/gir :
2020-07-23 17:31:13 +02:00
cargo install --root target/tools --git $( GIR_REPO) --rev $( GIR_VERSION) -- gir
2018-10-09 22:24:06 +02:00
2019-05-24 21:51:34 +02:00
gir : target /tools /bin /gir
target/tools/bin/gir -c conf/ostree-sys.toml
target/tools/bin/gir -c conf/ostree.toml
2018-10-09 22:24:06 +02:00
2020-08-26 10:09:25 +02:00
gir-report : target /tools /bin /gir
2019-06-13 20:01:30 +02:00
target/tools/bin/gir -c conf/ostree.toml -m not_bound
2018-10-18 19:03:03 +02:00
2018-10-18 21:58:56 +02:00
# -- LGPL docs generation --
2018-10-20 11:59:54 +02:00
target/tools/bin/rustdoc-stripper :
2019-12-15 14:05:17 +01:00
cargo install --root target/tools --version $( RUSTDOC_STRIPPER_VERSION) -- rustdoc-stripper
2018-10-18 21:58:56 +02:00
2018-10-20 11:59:54 +02:00
merge-lgpl-docs : target /tools /bin /gir target /tools /bin /rustdoc -stripper
2019-05-16 21:41:38 +02:00
target/tools/bin/gir -c conf/ostree.toml -m doc
2018-10-20 11:59:54 +02:00
target/tools/bin/rustdoc-stripper -g -o target/vendor.md
2018-10-18 21:58:56 +02:00
2018-10-18 19:03:03 +02:00
# -- gir file management --
2018-10-09 22:24:06 +02:00
update-gir-files : \
remove-gir-files \
gir-files \
gir-files/GLib-2.0.gir \
gir-files/Gio-2.0.gir \
2020-07-24 14:57:04 +02:00
gir-files/GObject-2.0.gir \
gir-files/OSTree-1.0.gir
2018-10-09 22:24:06 +02:00
remove-gir-files :
2020-07-24 15:00:33 +02:00
rm -f gir-files/*.gir
2018-10-09 22:24:06 +02:00
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 :
2022-06-03 09:57:12 -04:00
ln -sfr ../OSTree-1.0.gir $@