File: rules

package info (click to toggle)
xtensor-blas 0.21.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 13,864 kB
  • sloc: cpp: 97,843; makefile: 202; perl: 178; python: 153
file content (41 lines) | stat: -rwxr-xr-x 1,105 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
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

include /usr/share/dpkg/default.mk

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
BUILD_OPTIONS+=-DBUILD_TESTS=ON \
        -DGTEST_SRC_DIR="/usr/src/googletest"
else
BUILD_OPTIONS+=-DBUILD_TESTS=OFF
endif

# -march=native on mipsel is unreliable,
# success depends on the machine (specific CPU model)
# Best to just switch off -march=native
# (allow it on other arches in order to test the typical user experience)
ifneq (,$(findstring $(DEB_HOST_ARCH),mipsel))
  BUILD_OPTIONS += -Darch_native_supported=OFF
endif

%:
	dh $@ --with sphinxdoc

execute_after_dh_auto_clean:
	rm -f include/xtensor-blas/xblas_config_cling.hpp
	rm -rf docs/build docs/xml

override_dh_auto_configure:
	dh_auto_configure -- $(BUILD_OPTIONS)

execute_after_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	$(MAKE) -C docs html
endif

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	CTEST_OUTPUT_ON_FAILURE=1 dh_auto_test -- xtest
endif