]> git.proxmox.com Git - proxmox.git/blob - Makefile
api/router: percent decode the components of the uri
[proxmox.git] / Makefile
1 # Shortcut for common operations:
2
3 CRATES=proxmox proxmox-api-macro proxmox-sortable-macro
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 .PHONY: dinstall
15 dinstall:
16 $(MAKE) clean
17 $(MAKE) deb
18 sudo -k dpkg -i build/librust-*.deb
19
20 %-deb:
21 ./build.sh $*
22 touch $@
23
24 .PHONY: check
25 check:
26 cargo test
27
28 # Run the api-test server, serving the api-test/www/ subdir as 'www' dir over
29 # http:
30 .PHONY: apitest
31 apitest:
32 cargo run -p api-test -- api-test/www/
33
34 # Prints a diff between the current code and the one rustfmt would produce
35 .PHONY: fmt
36 fmt:
37 cargo +nightly fmt -- --check
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
52
53 %-upload: %-deb
54 cd build; \
55 dcmd --deb rust-$*_*.changes \
56 | grep -v '.changes$$' \
57 | tar -cf- -T- \
58 | ssh -X repoman@repo.proxmox.com upload --product devel --dist buster