]> git.proxmox.com Git - proxmox.git/blame - Makefile
proxmox-schema: use const_format to define static strings.
[proxmox.git] / Makefile
CommitLineData
35a60f76
WB
1# Shortcut for common operations:
2
de8fd435 3CRATES != /usr/bin/cargo metadata --no-deps --format-version=1 | jq -r .workspace_members'[]' | awk '{ print $$1 }'
a94de245 4
35a60f76
WB
5# By default we just run checks:
6.PHONY: all
7all: check
8
a94de245
FG
9.PHONY: deb
10deb: $(foreach c,$(CRATES), $c-deb)
11 echo $(foreach c,$(CRATES), $c-deb)
12 lintian build/*.deb
13
77e8db86
WB
14.PHONY: dsc
15dsc: $(foreach c,$(CRATES), $c-dsc)
16 echo $(foreach c,$(CRATES), $c-dsc)
17 lintian build/*.dsc
18
8e62cf06
FG
19.PHONY: autopkgtest
20autopkgtest: $(foreach c,$(CRATES), $c-autopkgtest)
21
93cf522d 22.PHONY: dinstall
3312a7ad
WB
23dinstall:
24 $(MAKE) clean
25 $(MAKE) deb
436bf05e 26 sudo -k dpkg -i build/librust-*.deb
93cf522d 27
a94de245
FG
28%-deb:
29 ./build.sh $*
30 touch $@
31
77e8db86
WB
32%-dsc:
33 BUILDCMD='dpkg-buildpackage -S -us -uc -d' ./build.sh $*
34 touch $@
35
8e62cf06
FG
36%-autopkgtest:
37 autopkgtest build/$* build/*.deb -- null
38 touch $@
39
35a60f76
WB
40.PHONY: check
41check:
42 cargo test
43
80343b11
WB
44# Run the api-test server, serving the api-test/www/ subdir as 'www' dir over
45# http:
46.PHONY: apitest
47apitest:
48 cargo run -p api-test -- api-test/www/
49
35a60f76
WB
50# Prints a diff between the current code and the one rustfmt would produce
51.PHONY: fmt
35a60f76 52fmt:
d84f563d 53 cargo +nightly fmt -- --check
35a60f76
WB
54
55# Doc without dependencies
56.PHONY: doc
57doc:
58 cargo doc --no-deps
59
60.PHONY: clean
61clean:
62 cargo clean
392290ec 63 rm -rf build/
0fb7ec0c 64 rm -f -- *-deb *-dsc *-autopkgtest *.build *.buildinfo *.changes
35a60f76
WB
65
66.PHONY: update
67update:
68 cargo update
0e9eb37e
FG
69
70%-upload: %-deb
71 cd build; \
72 dcmd --deb rust-$*_*.changes \
73 | grep -v '.changes$$' \
89d14b47 74 | tar -cf "$@.tar" -T-; \
bd63af3c 75 cat "$@.tar" | ssh -X repoman@repo.proxmox.com upload --product devel --dist bookworm