File: rules

package info (click to toggle)
fastdds 3.3.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 60,540 kB
  • sloc: cpp: 793,735; xml: 15,283; python: 5,902; sh: 219; makefile: 95; ansic: 12
file content (78 lines) | stat: -rwxr-xr-x 2,761 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
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all reproducible=+all future=+lfs

include /usr/share/dpkg/architecture.mk

TEST_ARCHS = amd64 arm64
SERIALIZED_TESTS = \
	DiscoverServer \
	ParticipantTests \
	TCPv4Tests \
	TCPv6Tests \
	UDPv4Tests \
	UDPv6Tests
SKIP_TESTS = \
	SystemInfoTests.GetMachineId \
	RTPSNetworkInterfaceChangesAtRunTime \
	ServerClientEnvironmentSetUp \
	LogTests.flush_n \
	UDPv6Tests.send \
	TCPv4Tests.client_announced_local_port_uniqueness \
	SHMTransportTests.port_listener_dead_recover \
	TwoPublishersCommunicationReliable \
	opening_output_channel_with_same_locator_as_local_listening_port \
	send_and_receive_between_allowed_interfaces_ports_by_name

BUILD_DOC   = $(if $(filter nodoc,$(DEB_BUILD_OPTIONS)),OFF,ON)
BUILD_TESTS = $(if $(or $(filter nocheck,$(DEB_BUILD_OPTIONS)),$(filter-out $(TEST_ARCHS),$(DEB_HOST_ARCH))),OFF,ON)

parallel = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
JOBS = $(addprefix -j,$(parallel))

export DEB_CXXFLAGS_MAINT_APPEND = -fvisibility-inlines-hidden

space = $(eval) $(eval)
concat_with = $(subst $(space),$1,$2)

%:
	dh $@ --buildsystem=cmake

override_dh_autoreconf:

override_dh_auto_configure:
	dh_auto_configure --buildsystem=cmake -- \
		-DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
		-DDOC_INSTALL_DIR=/usr/share/doc/libfastdds-dev \
		-DSECURITY=ON \
		-DBUILD_DOCUMENTATION=$(BUILD_DOC) \
		-DEPROSIMA_BUILD_TESTS=$(BUILD_TESTS) \
		-DRTPS_API_TESTS=ON -DFASTRTPS_API_TESTS=OFF -DFASTDDS_PIM_API_TESTS=OFF \
		-DDART_TESTING_TIMEOUT=60 \
		-DFORCE_CXX=17

override_dh_auto_test-arch:
ifeq ($(BUILD_TESTS),ON)
	-cd obj-$(DEB_HOST_GNU_TYPE) && \
	ctest --output-on-failure $(JOBS) $(if $(or $(SERIALIZED_TESTS),$(SKIP_TESTS)),-E '$(call concat_with,|,$(SERIALIZED_TESTS) $(SKIP_TESTS))') 
ifneq ($(SERIALIZED_TESTS),)
	-cd obj-$(DEB_HOST_GNU_TYPE) && \
	ctest --output-on-failure -j1 $(if $(SKIP_TESTS),-E '$(call concat_with,|,$(SKIP_TESTS))') -R '$(call concat_with,|,$(SERIALIZED_TESTS))'
endif
endif

override_dh_auto_test-indep:

execute_after_dh_auto_install:
	rm debian/tmp/usr/share/fastdds/LICENSE
	mkdir -p debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/fastdds
	mv debian/tmp/usr/include/fastdds/config.hpp debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/fastdds
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	ln -sf /usr/share/javascript/jquery/jquery.min.js debian/tmp/usr/share/doc/libfastdds-dev/api_reference/jquery.js
endif
	mv debian/tmp/usr/tools/fastdds/* debian/tmp/usr/share/fastdds
	sed -i -e '1 s+^!#.*+#!/usr/bin/python3+' debian/tmp/usr/share/fastdds/fastdds.py
	rm debian/tmp/usr/bin/fastdds
	cp debian/ros-discovery.sh debian/tmp/usr/bin/ros-discovery

override_dh_installexamples:
	dh_installexamples -X.gitignore