File: rules

package info (click to toggle)
googletest 1.8.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, buster-backports, sid
  • size: 6,404 kB
  • sloc: cpp: 47,805; python: 8,420; sh: 549; makefile: 547
file content (49 lines) | stat: -rwxr-xr-x 1,332 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
#!/usr/bin/make -f
# -*- makefile -*-

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)

CXXFLAGS += -fPIC

ifeq ($(DEB_HOST_ARCH),hppa)
CXXFLAGS += -mlong-calls
else ifeq ($(DEB_BUILD_ARCH), mips)
CXXFLAGS += -mxgot -g1
else ifeq ($(DEB_BUILD_ARCH), mips64el)
CXXFLAGS += -mxgot
else ifeq ($(DEB_BUILD_ARCH), mipsel)
CXXFLAGS += -mxgot -g1
endif

export CXXFLAGS


%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure --buildsystem=cmake -- -Dgmock_build_tests=ON -Dgtest_build_tests=ON

override_dh_autoreconf:
	autoreconf -vif

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cd obj-* && ctest || (cat Testing/Temporary/LastTest.log; exit 1)
endif

override_dh_install:
	dh_install
	find debian/googletest/usr/src/googletest -iname autom4te.cache -type d | xargs rm -rf
	find debian/googletest/usr/src/googletest -iname LICENSE -o -iname .gitignore -o -iname '*.pyc' | xargs rm
	find debian/googletest/usr/src/googletest -iname '*.py' | xargs chmod -x
	rm -rf debian/googletest/usr/src/googletest/*/msvc
	for f in $$(ls debian/googletest-tools/usr/bin/*.py); \
	  do mv $$f $$(echo $$f | sed s/\.py//); \
	done
	chmod a-x -R debian/googletest-tools/usr/share/googletest-tools/generator/cpp/*

override_dh_clean:
	dh_clean
	rm -f test/*.pyc