File: rules

package info (click to toggle)
iceoryx 2.0.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 11,260 kB
  • sloc: cpp: 94,127; ansic: 1,443; sh: 1,436; python: 1,377; xml: 80; makefile: 61
file content (81 lines) | stat: -rwxr-xr-x 2,996 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all reproducible=+all future=+lfs

include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk


BUILD_DOC := $(if $(filter nodoc,$(DEB_BUILD_OPTIONS)),OFF,ON)
BUILD_TEST := $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),OFF,ON)
LINK_LIBATOMIC := $(if $(filter mipsel powerpc riscv64,$(DEB_HOST_ARCH)),ON,OFF)

DOC_COMPONENTS = posh hoofs binding_c introspection
IOX_SOVERSION = 2
SHM_AVAIL = $(shell df -B1000000 --output=avail /dev/shm | tail -n1 || echo 0)

%:
	dh $@ --buildsystem=cmake --sourcedirectory=iceoryx_meta --builddirectory=obj

override_dh_auto_clean-indep:
	dh_auto_clean --buildsystem=cmake --sourcedirectory=iceoryx_meta --builddirectory=obj-indep

override_dh_auto_configure-arch:
	dh_auto_configure --buildsystem=cmake --sourcedirectory=iceoryx_meta --builddirectory=obj -- \
		-DIOX_SOVERSION=$(IOX_SOVERSION) \
		-DBINDING_C=ON \
		-DBUILD_DOC=OFF \
		-DBUILD_SHARED_LIBS=ON \
		-DBUILD_TEST=$(BUILD_TEST) \
		-DINTROSPECTION=ON \
		-DTOML_CONFIG=ON

override_dh_auto_configure-indep:
ifeq ($(BUILD_DOC),ON)
	dh_auto_configure --buildsystem=cmake --sourcedirectory=iceoryx_meta --builddirectory=obj-indep -- \
		-DIOX_SOVERSION=$(IOX_SOVERSION) \
		-DBUILD_DOC=ON
endif

override_dh_auto_build-indep:
ifeq ($(BUILD_DOC),ON)
	$(MAKE) -C obj-indep $(addprefix doxygen_iceoryx_,$(DOC_COMPONENTS))
endif

POSH_SHM_TESTS=*PoshRuntime.*:*PoshRuntime_test.*:*PoshRuntimeNode_test.*:*PoshRuntimeSingleProcess_test.*:*IceoryxRoudiMemoryManager_test.*:*PortManager_test.*:*ProcessManager_test.*
BINDING_C_SHM_TESTS=*Chunk_test.*:*iox_node_test.*:*BindingC_Runtime_test.*:*iox_service_discovery_test.*:*iox_sub_test.*:*iox_pub_test.*

override_dh_auto_test-arch:
	./obj/hoofs/test/hoofs_moduletests --gtest_filter="-*.TimingTest_*"
	./obj/posh/test/posh_moduletests --gtest_filter="-*.TimingTest_*:$(POSH_SHM_TESTS)"
	./obj/binding_c/test/binding_c_moduletests --gtest_filter="-*.TimingTest_*:$(BINDING_C_SHM_TESTS)"
	# SHM INTENSIVE TESTS
	# Only execute these if at least 250M shared memory are available
	[ $(SHM_AVAIL) -lt 250 ] || \
		./obj/posh/test/posh_moduletests --gtest_filter="$(POSH_SHM_TESTS)"
	[ $(SHM_AVAIL) -lt 250 ] || \
		./obj/binding_c/test/binding_c_moduletests --gtest_filter="$(BINDING_C_SHM_TESTS)"
	[ $(SHM_AVAIL) -lt 250 ] || \
		./obj/posh/test/posh_integrationtests --gtest_filter="-*.TimingTest_*"

override_dh_auto_test-indep:

DOC_DIR = debian/iceoryx-doc/usr/share/doc/iceoryx-doc
override_dh_auto_install-indep:
ifeq ($(BUILD_DOC),ON)
	mkdir -p $(DOC_DIR)
	set -ex; for component in $(DOC_COMPONENTS); do \
		mkdir -p $(DOC_DIR)/$$component; \
		cp -r obj-indep/doc/iceoryx_$$component/html $(DOC_DIR)/$$component; \
	done
	dh_doxygen
endif

execute_after_dh_auto_install-arch:
	rm -r debian/tmp/usr/share/doc

execute_before_dh_installman-arch: debian/iox-roudi.1 debian/iox-introspection-client.1
	true

%.1: %.1.in
	sed -e 's/@VERSION@/$(DEB_VERSION_UPSTREAM)/g' $< >$@