File: rules

package info (click to toggle)
cppcheck 2.17.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 25,384 kB
  • sloc: cpp: 263,341; python: 19,737; ansic: 7,953; sh: 1,018; makefile: 996; xml: 994; cs: 291
file content (62 lines) | stat: -rwxr-xr-x 1,870 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
#!/usr/bin/make -f

# export DH_VERBOSE=1

# for DEB_VERSION_UPSTREAM
include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export QT_SELECT := qt6

# See http://wiki.debian.org/Hardening#Notes_for_packages_using_CMake
CFLAGS   := $(CFLAGS) $(CPPFLAGS)
CXXFLAGS := $(CXXFLAGS) $(CPPFLAGS)

%:
	dh $@ --buildsystem=cmake --builddirectory=build

override_dh_auto_configure:
	[ -e backup ] || (mkdir backup; cp Makefile gui/*.ts backup)
	QTDIR= dh_auto_configure -- \
	  -DCMAKE_BUILD_TYPE=Release \
	  -DUSE_BUNDLED_TINYXML2=OFF \
	  -DUSE_MATCHCOMPILER=On \
	  -DHAVE_RULES=OFF \
	  -DBUILD_TESTS=ON \
	  -DBUILD_GUI=ON \
	  -DWITH_QCHART=ON \
	  -DUSE_QT6=ON \
	  -DFILESDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/cppcheck

override_dh_auto_build:
	dh_auto_build
	xsltproc -''-nonet -''-param man.charmap.use.subset "0" --output build/cppcheck.1 \
	  /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl \
	  man/cppcheck.1.xml
	sed -e "s/1.70/$(DEB_VERSION_UPSTREAM)/" debian/cppcheck-htmlreport.1.in \
	  >build/cppcheck-htmlreport.1

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	build/bin/testrunner
endif

override_dh_auto_install:
	dh_auto_install
	install htmlreport/cppcheck-htmlreport $(CURDIR)/debian/tmp/usr/bin
	install -d $(CURDIR)/debian/tmp/usr/share/man/man1
	install build/cppcheck.1 $(CURDIR)/debian/tmp/usr/share/man/man1
	install build/cppcheck-htmlreport.1 $(CURDIR)/debian/tmp/usr/share/man/man1
	dh_install --sourcedir=debian/tmp

# workaround for bug #949296: "dwz: debian/cppcheck/usr/bin/cppcheck: Unknown DWARF DW_OP_255"
override_dh_dwz:
	dh_dwz -Xcppcheck

override_dh_clean:
	dh_clean
	[ ! -e backup ] || (cp backup/Makefile .; cp backup/*.ts gui; rm backup/*; rmdir backup)
	rm -f plist*.plist