File: rules

package info (click to toggle)
firebuild 0.8.5.1-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 2,552 kB
  • sloc: cpp: 13,693; ansic: 6,086; python: 2,313; sh: 261; makefile: 40; awk: 33
file content (45 lines) | stat: -rwxr-xr-x 1,423 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# Use GCC 10 instead of earlier versions for better c++20 support
ifeq ($(shell $(CXX) --version | head -n1 | cut -d\  -f4 | xargs dpkg --compare-versions 10 lt || echo buggy-cxx-20),buggy-cxx-20)
export CC = gcc-10
export CXX = g++-10
endif
# Clang does not support -ffat-lto-objects and this breaks check_c_compiler_flag() tests in cmake
ifeq ($(CC),clang)
export DEB_CFLAGS_MAINT_STRIP = -ffat-lto-objects
export DEB_CPPFLAGS_MAINT_STRIP = -ffat-lto-objects
export DEB_CXXFLAGS_MAINT_STRIP = -ffat-lto-objects
export DEB_LDLAGS_MAINT_STRIP = -ffat-lto-objects
endif

VER_GLIBC := $(shell dpkg -s libc6 | grep ^Version: | cut -f2 -d' ' | cut -f1 -d '-')

%:
	dh $@

ifneq (,$(filter $(distrelease),bionic))
# Bionic's jemalloc does not ship pkgconfig files needed to detect it.
# TODO check performance with and without jemalloc on Bionic and maybe change
# detection to work without pkgconfig
override_dh_auto_configure:
   dh_auto_configure -- -DJEMALLOC_LIBRARIES=-ljemalloc
endif

# dwz does not support dwarf-5 binaries emitted by clang
# https://sourceware.org/bugzilla/show_bug.cgi?id=28985
override_dh_dwz:
ifneq ($(CC),clang)
	dh_dwz
endif

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	make -C obj-* check
endif

override_dh_gencontrol:
	dh_gencontrol -- '-Vglibc:Depends=libc6 (>= '$(VER_GLIBC)')'

override_dh_installchangelogs:
	dh_installchangelogs -k ChangeLog