]> git.proxmox.com Git - perlmod.git/blame - Makefile
bump perlmod-bin to 0.2.0-3
[perlmod.git] / Makefile
CommitLineData
54fd53e1
WB
1# Shortcut for common operations:
2
3CRATES=perlmod perlmod-macro
4
5# By default we just run checks:
6.PHONY: all
7all: check
8
9.PHONY: deb
10deb: $(foreach c,$(CRATES), $c-deb)
11 echo $(foreach c,$(CRATES), $c-deb)
12 lintian build/*.deb
13
14.PHONY: dinstall
15dinstall:
16 $(MAKE) clean
17 $(MAKE) deb
18 sudo -k dpkg -i build/librust-*.deb
19
9a4968f9
WB
20perlmod-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
54fd53e1
WB
26%-deb:
27 ./build.sh $*
28 touch $@
29
906b95b1
WB
30builddeps: $(foreach c,$(CRATES), $c-builddeps)
31%-builddeps:
32 BUILDCMD="mk-build-deps" ./build.sh $*
33
54fd53e1
WB
34.PHONY: check
35check:
36 cargo test
8d93a3de
WB
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
54fd53e1
WB
41
42# Prints a diff between the current code and the one rustfmt would produce
43.PHONY: fmt
44fmt:
45 cargo +nightly fmt -- --check
46
47# Doc without dependencies
48.PHONY: doc
49doc:
50 cargo doc --no-deps
51
52.PHONY: clean
53clean:
54 cargo clean
55 rm -rf build *-deb
56
57.PHONY: update
58update:
59 cargo update
60
61%-upload: %-deb
62 cd build; \
71fe7e0e 63 dcmd --deb ./*$*_*.changes \
54fd53e1
WB
64 | grep -v '.changes$$' \
65 | tar -cf- -T- \
fd5490e4 66 | ssh -X repoman@repo.proxmox.com upload --product devel --dist bookworm