File: rules

package info (click to toggle)
sparse 0.6.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,060 kB
  • sloc: ansic: 43,155; sh: 551; python: 300; perl: 293; makefile: 272
file content (29 lines) | stat: -rwxr-xr-x 731 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/vendor.mk

DH_MAKE_ARGS = SPARSE_VERSION="\$$(VERSION) ($(DEB_VENDOR): $(DEB_VERSION))" PREFIX=/usr

ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
DH_MAKE_ARGS += V=1
endif

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- $(DH_MAKE_ARGS)

override_dh_auto_test:
	dh_auto_test -- $(DH_MAKE_ARGS)
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	printf 'uname -m: %s\ngcc -dumpmachine: %s\n' $$(uname -m) $$(gcc -dumpmachine)
# test for missing cpp symbols to compile hosted programs
	env CHECK=./sparse ./cgcc -no-compile memops.c
endif

override_dh_auto_install:
	dh_auto_install -- $(DH_MAKE_ARGS)