File: rules

package info (click to toggle)
eigen3 3.3.9-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,736 kB
  • sloc: cpp: 117,972; ansic: 54,796; fortran: 24,137; sh: 804; javascript: 203; python: 176; makefile: 34
file content (47 lines) | stat: -rwxr-xr-x 1,369 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
BUILDDIR = $(CURDIR)/debian/build

NJOBS :=
USE_CPUS := 1
ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
    USE_CPUS := $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
    NJOBS := -j $(USE_CPUS)
    export EIGEN_MAKE_ARGS=-j$(USE_CPUS)
endif

# If SALSABUILD is set we want to drop debug info as well
ifneq ($(SALSABUILD),)
  export DEB_CXXFLAGS_MAINT_APPEND += -g0
endif

%:
	dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR)

export DEB_BUILD_MAINT_OPTIONS := hardening=+all

sse_archs = amd64 i386 kfreebsd-amd64 kfreebsd-i386

extra_flags += -DDART_TESTING_TIMEOUT=300

ifneq (,$(filter $(DEB_HOST_ARCH),$(sse_archs)))
	extra_flags += \
		-DEIGEN_TEST_SSE2=ON \
		-DEIGEN_TEST_SSE3=ON
endif
	
override_dh_auto_configure:
	dh_auto_configure -- $(extra_flags)

override_dh_installchangelogs:
	dh_installchangelogs debian/Changelog_upstream

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cd $(BUILDDIR); $(MAKE) buildtests $(NJOBS)
	dh_auto_test ARGS=-VV || true
endif

override_dh_auto_build-indep:
	cd $(BUILDDIR) && $(MAKE) doc $(NJOBS)
	cd $(BUILDDIR) && find . -type f -print0 | xargs -0 sed -i 's/https:\/\/cdn.mathjax.org\/mathjax\/latest\/MathJax.js/\/usr\/share\/javascript\/mathjax\/MathJax.js/g'
	rm -f $(BUILDDIR)/doc/html/unsupported/installdox