File: rules

package info (click to toggle)
nml 0.7.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,792 kB
  • sloc: python: 18,398; ansic: 109; makefile: 69
file content (34 lines) | stat: -rwxr-xr-x 1,168 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
#!/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 $@ --buildsystem pybuild

ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
# Enable verbose by *unsetting* _V, which defaults to a prefix that
# supresses verbose output
TEST_VERBOSE="_V="
endif

override_dh_auto_test:
	# Override regression testing to:
	#  - Prevent python from generating pyc files all over the
	#    source tree.
	#  - Control test verbosity
	#  - Use `make regression` instead of `make test`, since the
	#    latter includes style checks that might cause unneccesary
	#    test failures when the style check tools are updated.
	PYTHONDONTWRITEBYTECODE=1 make regression $(TEST_VERBOSE)

execute_after_dh_auto_clean:
	# The distutils buildsystem doesn't know about the regression
	# test, so we'll have to manually clean it.
	make clean