-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
66 lines (53 loc) · 1.3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Shortcut for common operations:
CRATES=perlmod perlmod-macro
# By default we just run checks:
.PHONY: all
all: check
.PHONY: deb
deb: $(foreach c,$(CRATES), $c-deb)
echo $(foreach c,$(CRATES), $c-deb)
lintian build/*.deb
.PHONY: dinstall
dinstall:
$(MAKE) clean
$(MAKE) deb
sudo -k dpkg -i build/librust-*.deb
perlmod-bin-deb:
mkdir build || true
rm -rf build/perlmod-bin-deb
git archive --format=tar HEAD perlmod-bin | tar -C build -xf -
cd build/perlmod-bin && dpkg-buildpackage --no-sign -b
%-deb:
./build.sh $*
touch $@
builddeps: $(foreach c,$(CRATES), $c-builddeps)
%-builddeps:
BUILDCMD="mk-build-deps" ./build.sh $*
.PHONY: check
check:
cargo test
cargo build
perl test.pl >out.test
if diff -up out.test test.pl.expected; then rm out.test; \
else echo "Test output mismatch between out.test and test.pl.expected"; fi
# Prints a diff between the current code and the one rustfmt would produce
.PHONY: fmt
fmt:
cargo +nightly fmt -- --check
# Doc without dependencies
.PHONY: doc
doc:
cargo doc --no-deps
.PHONY: clean
clean:
cargo clean
rm -rf build *-deb
.PHONY: update
update:
cargo update
%-upload: %-deb
cd build; \
dcmd --deb ./*$*_*.changes \
| grep -v '.changes$$' \
| tar -cf- -T- \
| ssh -X [email protected] upload --product devel --dist bookworm