File: rules

package info (click to toggle)
nfft 3.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 7,532 kB
  • ctags: 2,844
  • sloc: ansic: 41,128; makefile: 1,022; sh: 81; sed: 5
file content (85 lines) | stat: -rwxr-xr-x 2,072 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/make -f

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

include /usr/share/dpkg/architecture.mk

# Hardening flags.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# Available precisions.
PRECISIONS = single double
ifneq (,$(findstring libnfft3-long2,$(shell dh_listpackages)))
	PRECISIONS += long
endif

# Tested precisions.
# NOTE: Testing is temporarily restricted to single- and double-precision
# builds on powerpc architectures. See Bug-Debian #844403.
ifneq (,$(findstring $(DEB_HOST_ARCH_CPU),powerpc ppc64el))
	TESTED_PRECISIONS = single double
else
	TESTED_PRECISIONS = $(PRECISIONS)
endif

# Build options common to arch and indep targets.
BUILD_OPTIONS = \
	--disable-applications \
	--disable-doxygen-doc \
	--disable-examples \
	--disable-static \
	--enable-all \
	--enable-openmp

%:
	dh $@

override_dh_auto_clean:
	for p in $(PRECISIONS) ; do \
		dh_auto_clean --builddirectory=build-$$p ; \
	done

override_dh_auto_configure-arch:
	dh_auto_configure --builddirectory=build-single -- \
		$(BUILD_OPTIONS) \
		--enable-single
	dh_auto_configure --builddirectory=build-double -- \
		$(BUILD_OPTIONS)
ifneq (,$(findstring long,$(PRECISIONS)))
	dh_auto_configure --builddirectory=build-long -- \
		$(BUILD_OPTIONS) \
		--enable-long-double
endif

override_dh_auto_configure-indep:
	dh_auto_configure --builddirectory=build-double -- \
		$(BUILD_OPTIONS) \
		--enable-doxygen-doc

override_dh_auto_build-arch:
	for p in $(PRECISIONS) ; do \
		dh_auto_build --builddirectory=build-$$p ; \
	done

override_dh_auto_build-indep:
	dh_auto_build --builddirectory=build-double -- doc

override_dh_auto_test-arch:
	for p in $(TESTED_PRECISIONS) ; do \
		dh_auto_test --builddirectory=build-$$p ; \
	done

override_dh_auto_test-indep:
	# No-op.

override_dh_auto_install-arch:
	for p in $(PRECISIONS) ; do \
		dh_auto_install --builddirectory=build-$$p ; \
	done

override_dh_installdocs-indep:
	dh_installdocs --indep
	dh_doxygen --indep