File: rules

package info (click to toggle)
sccache 0.4.0~~pre6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,920 kB
  • sloc: sh: 383; perl: 255; python: 148; ansic: 31; makefile: 16
file content (27 lines) | stat: -rwxr-xr-x 743 bytes parent folder | download
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
#!/usr/bin/make -f

# generate documentation unless nodoc requested
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
MANPAGES = debian/sccache.1
endif

# use local fork of dh-cargo and cargo wrapper
PATH := $(CURDIR)/debian/dh-cargo/bin:$(PATH)
PERL5LIB = $(CURDIR)/debian/dh-cargo/lib
export PATH PERL5LIB

%:
	dh $@ --buildsystem cargo

# ensure ccache is not in use during tests
override_dh_auto_test:
	PATH=$(CURDIR)/debian/dh-cargo/bin:/usr/sbin:/usr/bin:/sbin:/bin dh_auto_test --buildsystem cargo

execute_after_dh_auto_install: $(MANPAGES)

# build manpages
debian/sccache.1: debian/%.1: debian/sccache/usr/bin/%
	help2man --section 1 --no-info \
		--name "a fast C/C++/Rust compiler cache" \
		--output $@ $< \
		|| { $1 --help; false; }