File: rules

package info (click to toggle)
pycuda 2020.1~dfsg1-1
  • links: PTS, VCS
  • area: contrib
  • in suites: bullseye
  • size: 1,600 kB
  • sloc: python: 8,932; cpp: 8,136; makefile: 106
file content (49 lines) | stat: -rwxr-xr-x 1,356 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
#! /usr/bin/make -f

ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
export DH_VERBOSE = 1
export PYBUILD_VERBOSE=1
else
export DH_QUIET = 1
endif

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk

export PYBUILD_DESTDIR_python3=debian/python3-$(DEB_SOURCE)/
export PYBUILD_DESTDIR_python3-dbg=debian/python3-$(DEB_SOURCE)-dbg/

ifneq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
DEB_CXXFLAGS_MAINT_STRIP=-O2
DEB_CXXFLAGS_MAINT_APPEND=-O0
endif

BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)")
SPHINXOPTS:=-D today=\"$(BUILD_DATE)\"
SPHINXOPTS+=-D html_last_updated_fmt=\"$(BUILD_DATE)\"

%:
	dh $@ --buildsystem pybuild

override_dh_auto_configure:
	./configure.py --boost-python-libname=boost_python \
		--boost-thread-libname=boost_thread \
		--cuda-root=/usr --cuda-enable-gl

execute_after_dh_auto_build-indep:
	$(MAKE) -C doc html SPHINXOPTS="$(SPHINXOPTS)"

execute_after_dh_auto_clean:
	$(MAKE) -C doc clean
	$(RM) Makefile siteconf.py

# Do not run test automatically - they require CUDA-capable hardware
override_dh_auto_test:

override_dh_strip:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
	dh_strip -ppython3-$(DEB_SOURCE) --dbg-package=python3-$(DEB_SOURCE)-dbg
endif