]> git.proxmox.com Git - proxmox.git/blob - Makefile
build: switch to debcargo
[proxmox.git] / Makefile
1 # Shortcut for common operations:
2
3 CRATES=proxmox proxmox-api proxmox-api-macro proxmox-sortable-macro proxmox-sys proxmox-tools
4
5 # By default we just run checks:
6 .PHONY: all
7 all: check
8
9 .PHONY: deb
10 deb: $(foreach c,$(CRATES), $c-deb)
11 echo $(foreach c,$(CRATES), $c-deb)
12 lintian build/*.deb
13
14 %-deb:
15 ./build.sh $*
16 touch $@
17
18 .PHONY: check
19 check:
20 cargo fmt -- --check
21 cargo test
22
23 # Run the api-test server, serving the api-test/www/ subdir as 'www' dir over
24 # http:
25 .PHONY: apitest
26 apitest:
27 cargo run -p api-test -- api-test/www/
28
29 # Prints a diff between the current code and the one rustfmt would produce
30 .PHONY: fmt
31 checkfmt:
32 cargo fmt --all -- --check
33
34 # Reformat the code (ppply the output of `make checkfmt`)
35 .PHONY: fmt
36 fmt:
37 cargo fmt --all
38
39 # Doc without dependencies
40 .PHONY: doc
41 doc:
42 cargo doc --no-deps
43
44 .PHONY: clean
45 clean:
46 cargo clean
47 rm -rf build *-deb
48
49 .PHONY: update
50 update:
51 cargo update