File: rules

package info (click to toggle)
starpu 1.3.7+dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 33,836 kB
  • sloc: ansic: 273,366; sh: 6,082; makefile: 4,776; xml: 4,048; f90: 3,876; cpp: 1,283; lisp: 799; python: 369; sed: 162; pascal: 57; fortran: 25
file content (87 lines) | stat: -rwxr-xr-x 3,294 bytes parent folder | download | duplicates (2)
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
86
87
#!/usr/bin/make -f

DH_OPTIONS=-Bbuild

source=$(shell dpkg-parsechangelog -S Source)

# These are the best versions that nvcc supports.
CONTRIB_GCC_VERSION  := 8
CONTRIB_CLANG_VERSION  := 8

ifeq ($(source),starpu-contrib)
# nvcc sometimes chokes on some gcc features
CC=cuda-gcc
CXX=cuda-g++
endif
OMPI_CC=$(CC)
export CC
export CXX
export OMPI_CC

export NVCCFLAGS = -Xcompiler -fPIC -Xcompiler -std=c++03

ifneq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
CONFIGURE_NODOC = --disable-build-doc
endif

%:
	dh $@ $(DH_OPTIONS)

override_dh_auto_configure:
	dh_auto_configure $(DH_OPTIONS) -- \
		--enable-opengl-render \
		--enable-openmp \
		--enable-quick-check \
		--enable-mlr-system-blas \
		--enable-starpurm \
		--enable-starpurm-examples \
		--docdir=/usr/share/doc/libstarpu-dev --disable-build-doc-pdf \
		$(CONFIGURE_NODOC)

override_dh_auto_test:
	-HOME=$$PWD DISPLAY= DEB_BUILD_OPTIONS=$(patsubst parallel=%,,$(DEB_BUILD_OPTIONS)) dh_auto_test $(DH_OPTIONS) -- -k
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) -C build showcheck
endif

override_dh_auto_clean:
	dh_auto_clean $(DH_OPTIONS) 
	rm -fr doc/doxygen/starpu.pdf
	rm -fr doc/doxygen/html
	rm -fr .starpu
	rm -fr .nv

# Switch to main rules
main:
	sed -i 's/^starpu-contrib /starpu /' debian/changelog
	sed -i '1s/^Source: starpu-contrib/Source: starpu/' debian/control
	sed -i 's/Package: libstarpu-contrib/Package: libstarpu/' debian/control
	sed -i 's/Package: starpu-contrib/Package: starpu/' debian/control
	sed -i 's/Package: libsocl-contrib/Package: libsocl/' debian/control
	sed -i '/Depends/s/ libstarpu-contrib/ libstarpu/g' debian/control
	sed -i '/Depends/s/ libsocl-contrib/ libsocl/g' debian/control
	sed -i 's/Conflicts: libstarpu/Conflicts: libstarpu-contrib/' debian/control
	sed -i 's/Conflicts: libsocl/Conflicts: libsocl-contrib/' debian/control
	sed -i 's/Conflicts: starpu/Conflicts: starpu-contrib/' debian/control
	sed -i 's/^	nvidia-cuda-toolkit-gcc/#	nvidia-cuda-toolkit-gcc/' debian/control
	sed -i 's_^Section: contrib/_Section: _' debian/control
	sed -i 's/contrib-contrib/contrib/g' debian/control debian/changelog
	sed -i 's/^ This "contrib" version/# This "contrib" version/' debian/control

# Switch to contrib rules
contrib:
	sed -i 's/^starpu /starpu-contrib /' debian/changelog
	sed -i '1s/^Source: starpu/Source: starpu-contrib/' debian/control
	sed -i 's/Package: libstarpu/Package: libstarpu-contrib/' debian/control
	sed -i 's/Package: starpu/Package: starpu-contrib/' debian/control
	sed -i 's/Package: libsocl/Package: libsocl-contrib/' debian/control
	sed -i '/Depends/s/ libstarpu/ libstarpu-contrib/g' debian/control
	sed -i '/Depends/s/ libsocl/ libsocl-contrib/g' debian/control
	sed -i 's/Conflicts: libstarpu-contrib/Conflicts: libstarpu/' debian/control
	sed -i 's/Conflicts: libsocl-contrib/Conflicts: libsocl/' debian/control
	sed -i 's/Conflicts: starpu-contrib/Conflicts: starpu/' debian/control
	sed -i 's/#	nvidia-cuda-toolkit-gcc/	nvidia-cuda-toolkit-gcc/' debian/control
	sed -i 's_contrib/contrib/_contrib_g' debian/control debian/control
	sed -i 's/contrib-contrib/contrib/g' debian/control debian/changelog
	sed -i 's_^Section: \([^/]*\)$$_Section: contrib/\1_' debian/control
	sed -i 's/^# This "contrib" version/ This "contrib" version/' debian/control