blob: e87f5c0dfe8002c0575b973a6df9d44ae6e1223d (
plain)
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
|
# Build ########################################################################
setup:
meson setup _build
build: setup
meson compile -C _build
dist: setup
meson dist -C _build --no-tests --allow-dirty
# Code Quality #################################################################
test:
cargo test
coverage:
cargo tarpaulin
format:
cargo fmt && cargo clippy --fix
lint:
cargo fmt -- --check && cargo clippy
# Internationalization / Localization ##########################################
# Finds all files that can be translated and adds them to the POTFILES
find_translatable_files:
find ./src -not -path '*/.*' -type f -name "*.rs" -exec grep -l "tr!(\"\|gettext" {} \; | sed 's|^\./||' | sort > po/POTFILES
find ./data -not -path '*/.*' -name "*.in.in" -type f | sed 's|^\./||' | sort >> po/POTFILES
extract_strings: find_translatable_files
@xgettext --files-from=po/POTFILES --output=po/systems.tranquil.Map.pot --from-code=UTF-8 --add-comments --keyword='tr!'
# Utility Tasks ################################################################
version:
@grep -m1 -o "[^_]version: '[^']*'" meson.build | awk -F"'" '{print $2}'
vendor location:
cargo vendor {{location}} >/dev/null
mkdir -p .cargo
|