File: rules

package info (click to toggle)
msgpack-cxx 7.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,520 kB
  • sloc: cpp: 87,413; ansic: 3,571; sh: 56; makefile: 39
file content (54 lines) | stat: -rwxr-xr-x 1,414 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
50
51
52
53
54
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk

export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS

%:
	dh $@ --buildsystem=cmake+ninja --builddirectory=build$(DEFAULT_CPPVER)

CPPVERS = CXX11 CXX14 CXX17 CXX20
export DEFAULT_CPPVER = CXX11

# If we're running tests, then setup the build for all the supported C++
# standards so we can run the entire test suite
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_configure:
	set -e; for ver in $(CPPVERS); do \
	  dh_auto_configure --buildsystem=cmake+ninja --builddirectory=build$${ver} -- -DMSGPACK_$${ver}=ON -DMSGPACK_BUILD_TESTS=ON; \
	done

override_dh_auto_build-arch:
	set -e; for ver in $(CPPVERS); do \
	  dh_auto_build --builddirectory=build$${ver}; \
	done

override_dh_auto_test-arch:
	set -e; for ver in $(CPPVERS); do \
	  dh_auto_test --builddirectory=build$${ver}; \
	done
else
override_dh_auto_configure:
	dh_auto_configure --builddirectory=build$(DEFAULT_CPPVER) -- -DMSGPACK_$(DEFAULT_CPPVER)=ON
endif

ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
override_dh_auto_build-indep:
	dh_auto_build -- doxygen

override_dh_install-indep:
	dh_install -i

override_dh_installdocs-indep:
	mkdir -p build/html
	dh_installdocs
	dh_doxygen

override_dh_link-indep:
	dh_link -i
	jdupes -rl debian/libmsgpack-cxx-doc/usr/

override_dh_auto_test-indep:
endif