File: rules

package info (click to toggle)
nml 0.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,040 kB
  • sloc: python: 15,038; ansic: 108; makefile: 41
file content (29 lines) | stat: -rwxr-xr-x 1,051 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
# -*- makefile -*-
# Makefile to build the nml debian package.

# Enable all hardening options (since nml processes potentially
# untrusted input).
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# Use debhelper default for all targets (but some are overridden below).
%:
	# Force the pybuild buildsystem, since there is also a
	# Makefile (which is used only for testing by this rules file).
	dh $@ --with python3 --buildsystem pybuild

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# Regression testing is done through a Makefile. Set an env var
	# to prevent python from generating pyc files all over the
	# source tree well. We still run dh_auto_test here, so we don't
	# need to check DEB_BUILD_OPTIONS for nocheck
	PYTHONDONTWRITEBYTECODE=1 dh_auto_test --buildsystem makefile
endif

override_dh_auto_clean:
	dh_auto_clean
	# The distutils buildsystem doesn't know about the regression
	# test, so we'll have to manually clean it. Ignore any failures
	# by prepending a dash.
	make -C regression clean