-
Notifications
You must be signed in to change notification settings - Fork 305
/
Makefile
52 lines (37 loc) · 1.33 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
GIR_REPO := https://github.com/gtk-rs/gir.git
GIR_VERSION := 0eeebbdf9d4d5a0b0148c7fa055bf961e16e54a0
OSTREE_REPO := ../ostree
OSTREE_VERSION := patch-v2022.2
RUSTDOC_STRIPPER_VERSION := 0.1.17
all: gir
.PHONY: gir gir-report update-gir-files remove-gir-files merge-lgpl-docs ci-build-stages
# -- gir generation --
target/tools/bin/gir:
cargo install --root target/tools --git $(GIR_REPO) --rev $(GIR_VERSION) -- gir
gir: target/tools/bin/gir
target/tools/bin/gir -c conf/ostree-sys.toml
target/tools/bin/gir -c conf/ostree.toml
gir-report: target/tools/bin/gir
target/tools/bin/gir -c conf/ostree.toml -m not_bound
# -- LGPL docs generation --
target/tools/bin/rustdoc-stripper:
cargo install --root target/tools --version $(RUSTDOC_STRIPPER_VERSION) -- rustdoc-stripper
merge-lgpl-docs: target/tools/bin/gir target/tools/bin/rustdoc-stripper
target/tools/bin/gir -c conf/ostree.toml -m doc
target/tools/bin/rustdoc-stripper -g -o target/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 \
gir-files/OSTree-1.0.gir
remove-gir-files:
rm -f gir-files/*.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:
ln -sfr ../OSTree-1.0.gir $@