File: rules

package info (click to toggle)
ctre 3.9.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,084 kB
  • sloc: cpp: 80,452; makefile: 135; javascript: 69; python: 31
file content (29 lines) | stat: -rwxr-xr-x 864 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1

include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk

DOC_INSTALL_DIR = debian/libctre-doc/usr/share/doc/libctre-dev

%:
	dh $@ --with=sphinxdoc --buildsystem=cmake+ninja --builddir=build

override_dh_auto_configure:
	dh_auto_configure -- -DCTRE_BUILD_TESTS=ON

override_dh_installdocs:
	dh_installdocs
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	touch "$(CURDIR)/docs/_static" # referred to in docs/conf.py, avoid errors
	sphinx-build -N -bhtml "$(CURDIR)/docs" "$(DOC_INSTALL_DIR)/html/"
	rm "$(DOC_INSTALL_DIR)/html/_static/_static" # make lintian happy
endif

override_dh_auto_test:
# these test files only need to be built, not run
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cmake --build build --target ctre-test --verbose
endif