]> git.proxmox.com Git - perlmod.git/blob - Makefile
bump perlmod-bin to 0.2.0-3
[perlmod.git] / Makefile
1 # Shortcut for common operations:
2
3 CRATES=perlmod perlmod-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 builddeps: $(foreach c,$(CRATES), $c-builddeps)
25 %-builddeps:
26 BUILDCMD="mk-build-deps" ./build.sh $*
27
28 .PHONY: check
29 check:
30 cargo test
31
32 # Prints a diff between the current code and the one rustfmt would produce
33 .PHONY: fmt
34 fmt:
35 cargo +nightly fmt -- --check
36
37 # Doc without dependencies
38 .PHONY: doc
39 doc:
40 cargo doc --no-deps
41
42 .PHONY: clean
43 clean:
44 cargo clean
45 rm -rf build *-deb
46
47 .PHONY: update
48 update:
49 cargo update
50
51 %-upload: %-deb
52 cd build; \
53 dcmd --deb rust-$*_*.changes \
54 | grep -v '.changes$$' \
55 | tar -cf- -T- \
56 | ssh -X repoman@repo.proxmox.com upload --product devel --dist bullseye