File: rules

package info (click to toggle)
elpa 2019.11.001-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,380 kB
  • sloc: f90: 33,804; ansic: 24,131; sh: 4,583; asm: 834; makefile: 683; python: 634; perl: 141
file content (47 lines) | stat: -rwxr-xr-x 1,462 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
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/mpi-default-dev/debian_defaults

export OMPI_MCA_plm_rsh_agent=/bin/false
export LIBS=-lscalapack-$(ARCH_DEFAULT_MPI_IMPL)
# The gold linker is currently broken on mips64el. See #851736.
# Switch to bfd as a temporary workaround.
ifneq ($(filter $(DEB_BUILD_ARCH), mips64el),)
	export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed -Wl,-fuse-ld=bfd
else
	export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
endif

export DEB_FCFLAGS_MAINT_APPEND = -fallow-argument-mismatch

export TEST_FLAGS?=500 150 16

ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel powerpc))
	export TEST_FLAGS=200 12 2
endif

ifneq (,$(filter $(DEB_HOST_ARCH), mipsel powerpc))
        export MPIEXEC=mpiexec -n 1
endif

ifeq (,$(filter custom,$(DEB_BUILD_OPTIONS)))
BUILD_FLAGS=--disable-sse --disable-sse-assembly --disable-avx --disable-avx2 --disable-avx512
endif

# the current upstream version (2019.11.001) FTBFS when make is run in
# parallel, so force parallel to off via --max-parallel=1
%:
	dh $@ --max-parallel=1 --builddir=build

override_dh_auto_configure:
	dh_auto_configure -- --disable-silent-rules ${BUILD_FLAGS}

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	@echo "Running tests with matrix size ${TEST_FLAGS% *}"
	(cd build; $(MAKE) -j1 check || cat test-suite.log)
	build/elpa2_print_kernels
	# error out in case of test suite failures
	if grep ^FAIL build/test-suite.log; then exit 1; fi
endif