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