]> git.proxmox.com Git - proxmox.git/blob - Makefile
time: clippy fixes
[proxmox.git] / Makefile
1 # Shortcut for common operations:
2
3 CRATES = \
4 proxmox-api-macro \
5 proxmox-async \
6 proxmox-borrow \
7 proxmox-compression \
8 proxmox-http \
9 proxmox-io \
10 proxmox-lang \
11 proxmox-router \
12 proxmox-schema \
13 proxmox-serde \
14 proxmox-shared-memory \
15 proxmox-section-config \
16 proxmox-sortable-macro \
17 proxmox-sys \
18 proxmox-tfa \
19 proxmox-time \
20 proxmox-uuid
21
22 # By default we just run checks:
23 .PHONY: all
24 all: check
25
26 .PHONY: deb
27 deb: $(foreach c,$(CRATES), $c-deb)
28 echo $(foreach c,$(CRATES), $c-deb)
29 lintian build/*.deb
30
31 .PHONY: autopkgtest
32 autopkgtest: $(foreach c,$(CRATES), $c-autopkgtest)
33
34 .PHONY: dinstall
35 dinstall:
36 $(MAKE) clean
37 $(MAKE) deb
38 sudo -k dpkg -i build/librust-*.deb
39
40 %-deb:
41 ./build.sh $*
42 touch $@
43
44 %-autopkgtest:
45 autopkgtest build/$* build/*.deb -- null
46 touch $@
47
48 .PHONY: check
49 check:
50 cargo test
51
52 # Run the api-test server, serving the api-test/www/ subdir as 'www' dir over
53 # http:
54 .PHONY: apitest
55 apitest:
56 cargo run -p api-test -- api-test/www/
57
58 # Prints a diff between the current code and the one rustfmt would produce
59 .PHONY: fmt
60 fmt:
61 cargo +nightly fmt -- --check
62
63 # Doc without dependencies
64 .PHONY: doc
65 doc:
66 cargo doc --no-deps
67
68 .PHONY: clean
69 clean:
70 cargo clean
71 rm -rf build *-deb *-autopkgtest
72
73 .PHONY: update
74 update:
75 cargo update
76
77 %-upload: %-deb
78 cd build; \
79 dcmd --deb rust-$*_*.changes \
80 | grep -v '.changes$$' \
81 | tar -cf "$@.tar" -T-; \
82 cat "$@.tar" | ssh -X repoman@repo.proxmox.com upload --product devel --dist bullseye