Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 include /usr/share/rustc/architecture.mk
4 export DEB_HOST_GNU_TYPE
5 export DEB_HOST_RUST_TYPE
6
7 CARGO = /usr/share/cargo/bin/cargo
8
9 ifneq ($(DEB_TARGET_ARCH),mips64el)
10 # mips64el: see https://bugs.debian.org/1076650
11 RUSTFLAGS += -C codegen-units=1
12 endif
13 # these lto-related options seem to cause build errors that i don't understand
14 # see https://salsa.debian.org/rust-team/rust/-/merge_requests/41
15 #RUSTC_ARGS += -C lto=true -C linker-plugin-lto=true -C embed-bitcode=true
16 export RUSTFLAGS
17
18 CARGO_BUILD_ARGS = build --release --verbose
19
20 export CARGO_HOME = $(CURDIR)/debian/cargo_home
21
22 TARGET_RELEASE_DIR = target/$(DEB_HOST_RUST_TYPE)/release
23
24 %:
25 dh $@ --buildsystem cargo --with bash-completion
26
27 execute_after_dh_auto_build:
28 $(CARGO) $(CARGO_BUILD_ARGS) --bin sqopv --features=cliv
29 $(CARGO) $(CARGO_BUILD_ARGS) --bin sqop --features=cli
30
31 override_dh_auto_test:
32 dh_auto_test -- test --all