Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
4 include /usr/share/dpkg/architecture.mk
5 include /usr/share/dpkg/buildflags.mk
6
7 export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
8
9 %:
10 dh $@ --buildsystem=cmake+ninja --builddirectory=build$(DEFAULT_CPPVER)
11
12 CPPVERS = CXX11 CXX14 CXX17 CXX20
13 export DEFAULT_CPPVER = CXX11
14
15 # If we're running tests, then setup the build for all the supported C++
16 # standards so we can run the entire test suite
17 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
18 override_dh_auto_configure:
19 set -e; for ver in $(CPPVERS); do \
20 dh_auto_configure --buildsystem=cmake+ninja --builddirectory=build$${ver} -- -DMSGPACK_$${ver}=ON -DMSGPACK_BUILD_TESTS=ON; \
21 done
22
23 override_dh_auto_build-arch:
24 set -e; for ver in $(CPPVERS); do \
25 dh_auto_build --builddirectory=build$${ver}; \
26 done
27
28 override_dh_auto_test-arch:
29 set -e; for ver in $(CPPVERS); do \
30 dh_auto_test --builddirectory=build$${ver}; \
31 done
32 else
33 override_dh_auto_configure:
34 dh_auto_configure --builddirectory=build$(DEFAULT_CPPVER) -- -DMSGPACK_$(DEFAULT_CPPVER)=ON
35 endif
36
37 ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
38 override_dh_auto_build-indep:
39 dh_auto_build -- doxygen
40
41 override_dh_install-indep:
42 dh_install -i
43
44 override_dh_installdocs-indep:
45 mkdir -p build/html
46 dh_installdocs
47 dh_doxygen
48
49 override_dh_link-indep:
50 dh_link -i
51 jdupes -rl debian/libmsgpack-cxx-doc/usr/
52
53 override_dh_auto_test-indep:
54 endif