]> git.proxmox.com Git - perlmod.git/blob - Makefile
upload command pattern fixup
[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 perlmod-bin-deb:
21 mkdir build || true
22 rm -rf build/perlmod-bin-deb
23 git archive --format=tar HEAD perlmod-bin | tar -C build -xf -
24 cd build/perlmod-bin && dpkg-buildpackage --no-sign -b
25
26 %-deb:
27 ./build.sh $*
28 touch $@
29
30 builddeps: $(foreach c,$(CRATES), $c-builddeps)
31 %-builddeps:
32 BUILDCMD="mk-build-deps" ./build.sh $*
33
34 .PHONY: check
35 check:
36 cargo test
37 cargo build
38 perl test.pl >out.test
39 if diff -up out.test test.pl.expected; then rm out.test; \
40 else echo "Test output mismatch between out.test and test.pl.expected"; fi
41
42 # Prints a diff between the current code and the one rustfmt would produce
43 .PHONY: fmt
44 fmt:
45 cargo +nightly fmt -- --check
46
47 # Doc without dependencies
48 .PHONY: doc
49 doc:
50 cargo doc --no-deps
51
52 .PHONY: clean
53 clean:
54 cargo clean
55 rm -rf build *-deb
56
57 .PHONY: update
58 update:
59 cargo update
60
61 %-upload: %-deb
62 cd build; \
63 dcmd --deb ./*$*_*.changes \
64 | grep -v '.changes$$' \
65 | tar -cf- -T- \
66 | ssh -X repoman@repo.proxmox.com upload --product devel --dist bookworm