-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
83 lines (62 loc) · 2.32 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
fmt:
cargo check --tests
cargo fmt
.PHONY: msrv
msrv:
CARGO_TARGET_DIR=target-msrv cargo +$(shell yq -r .package.rust-version Cargo.toml) check --tests
.PHONY: lint
lint:
cargo fmt -- --check
cargo clippy
cargo check --features clap/deprecated
.PHONY: audit
audit:
cargo audit
.PHONY: release
release: target/release/bard
target/release/bard:
cargo build --release
.PHONY: test
test:
cargo nextest run --run-ignored all
.PHONY: check
check: test test-tectonic msrv lint audit
.PHONY: examples
examples:
cd default && cargo run -- make
cd example && cargo run -- make
cd tests/test-projects/all-features && cargo run -- make
.PHONY: book
book:
$(MAKE) -C doc book
.PHONY: serve-site
serve-site:
$(MAKE) -C doc serve-site
.PHONY: serve-book
serve-book:
$(MAKE) -C doc serve-book
.PHONY: book-clean
book-clean:
$(MAKE) -C doc clean
# tectonic embedding targets
.PHONY: with-tectonic
with-tectonic:
CARGO_TARGET_DIR=target-tectonic cargo build --release --features tectonic
.PHONY: test-tectonic
test-tectonic:
CARGO_TARGET_DIR=target-tectonic cargo nextest run --release --run-ignored all --features tectonic
# using vcpkg on windows
VCPKG_REV = 1c5a340f6e10985e2d92af174a68dbd15c1fa4e1 # https://github.com/microsoft/vcpkg/pull/29067
target/vcpkg/vcpkg.exe:
git clone https://github.com/Microsoft/vcpkg.git -- target/vcpkg
cd target/vcpkg && git checkout $(VCPKG_REV)
VCPKG_DISABLE_METRICS=1 target/vcpkg/bootstrap-vcpkg.bat
echo 'set(VCPKG_BUILD_TYPE release)' >> target/vcpkg/triplets/x64-windows-static.cmake
.PHONY: with-tectonic-windows
with-tectonic-windows: target/vcpkg/vcpkg.exe
VCPKG_DISABLE_METRICS=1 target/vcpkg/vcpkg install --triplet x64-windows-static icu graphite2 fontconfig freetype 'harfbuzz[icu,graphite2]'
TECTONIC_DEP_BACKEND=vcpkg VCPKG_ROOT="$(PWD)/target/vcpkg" VCPKGRS_TRIPLET='x64-windows-static' RUSTFLAGS='-Ctarget-feature=+crt-static' cargo build --release --features tectonic
.PHONY: test-tectonic-windows
test-tectonic-windows: target/vcpkg/vcpkg.exe
VCPKG_DISABLE_METRICS=1 target/vcpkg/vcpkg install --triplet x64-windows-static icu graphite2 fontconfig freetype 'harfbuzz[icu,graphite2]'
TECTONIC_DEP_BACKEND=vcpkg VCPKG_ROOT="$(PWD)/target/vcpkg" VCPKGRS_TRIPLET='x64-windows-static' RUSTFLAGS='-Ctarget-feature=+crt-static' cargo nextest run --release --run-ignored all --features tectonic