File: rules

package info (click to toggle)
mpdecimal 4.0.1-5
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,232 kB
  • sloc: ansic: 17,917; cpp: 6,508; sh: 4,236; makefile: 621; lisp: 502; python: 85; asm: 18
file content (50 lines) | stat: -rwxr-xr-x 1,329 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

SHELL = /bin/bash

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# package maintainers to append LDFLAGS
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

export LDXXFLAGS=$(LDFLAGS)

export DPKG_GENSYMBOLS_CHECK_LEVEL=4

DEB_BUILD_MULTIARCH ?= $(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

ifneq ($(DEB_BUILD_MULTIARCH),$(DEB_HOST_MULTIARCH))
  confargs += \
	have_glibc_memmove_bug=no \
	have_ipa_pure_const_bug=no
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--includedir=\$${prefix}/include/$(DEB_HOST_MULTIARCH) \
		--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
		$(confargs)

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	$(MAKE) -C tests
	: # needs download of tests, just run additional.decTest
	ln -sf testdata_dist tests/testdata
	cd tests && ./runtest ./additional.decTest
endif