forked from hove-io/transit_model
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (32 loc) · 1.75 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
PROJ_VERSION = 7.2.1
install_proj: ## Install PROJ and clang (requirements to use proj crate)
sudo apt update
sudo apt install -y clang
# Needed only for proj install
sudo apt install -y wget build-essential pkg-config sqlite3 libsqlite3-dev libtiff-dev libcurl4-nss-dev
# remove PROJ system version from packages
sudo apt remove libproj-dev
wget https://github.com/OSGeo/proj.4/releases/download/$(PROJ_VERSION)/proj-$(PROJ_VERSION).tar.gz
tar -xzvf proj-$(PROJ_VERSION).tar.gz
cd proj-$(PROJ_VERSION) && ./configure --prefix=/usr
make -C proj-$(PROJ_VERSION)
sudo make install -C proj-$(PROJ_VERSION)
rm -rf proj-$(PROJ_VERSION) proj-$(PROJ_VERSION).tar.gz
fmt: format ## Check formatting of the code (alias for 'format')
format: ## Check formatting of the code
cargo fmt --all -- --check
clippy: lint ## Check quality of the code (alias for 'lint')
lint: ## Check quality of the code
cargo clippy --workspace --all-features --all-targets -- --warn clippy::cargo --allow clippy::multiple_crate_versions --deny warnings
test: ## Launch all tests
# Run all the tests of `transit_model` in the entire repository.
# First activating all features (including `xmllint`)
cargo test --workspace --all-features --all-targets # `--all-targets` but no doctests
cargo test --workspace --all-features --doc # doctests only
# Then without features
cargo test --workspace --all-targets # `--all-targets` but no doctests
cargo test --workspace --doc # doctests only
help: ## Print this help message
@grep -E '^[a-zA-Z_-]+:.*## .*$$' $(CURDIR)/$(firstword $(MAKEFILE_LIST)) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: install_proj fmt format clippy lint test help
.DEFAULT_GOAL := help