File: rules

package info (click to toggle)
libgc 1%3A8.2.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,556 kB
  • sloc: ansic: 40,363; cpp: 1,062; makefile: 200; asm: 77; sh: 12
file content (67 lines) | stat: -rwxr-xr-x 1,888 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_BUILD_ARCH ?=$(shell dpkg --print-architecture)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

LDFLAGS += -pthread

%:
	dh $@ --with pkgkde_symbolshelper,autoreconf

COMMON_CONFIG = $(CONFIG_OPTS) \
		--enable-cplusplus \
		--enable-docs \
		--disable-dependency-tracking \
		--with-tags=CXX \
		--prefix=/usr \
		--mandir=\$${prefix}/share/man \
		--sysconfdir=/etc \
		--localstatedir=/var/lib \
		--datadir=\$${prefix}/share/doc \
		--host=$(DEB_HOST_GNU_TYPE) \
		--build=$(DEB_BUILD_GNU_TYPE) \
		--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
		--with-libatomic-ops=none

# --enable-static also disables building with symbol-visibility
# attributes, so build the static and dynamic libraries separately to
# ensure the .so symbols are correctly exported.
override_dh_auto_configure:
	[ ! -d libatomic_ops-1.2 ] || mv libatomic_ops-1.2 libatomic_ops-1.2.bak
	mkdir build-dynamic
	cd build-dynamic; ../configure \
		$(COMMON_CONFIG) \
		--enable-shared \
		--disable-static
	mkdir build-static
	cd build-static; ../configure \
		$(COMMON_CONFIG) \
		--enable-static \
		--disable-shared

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	cd build-dynamic; $(MAKE) check
endif

override_dh_auto_build:
	dh_auto_build -B build-dynamic
	dh_auto_build -B build-static

override_dh_auto_install:
	dh_auto_install -B build-dynamic
	dh_auto_install -B build-static

override_dh_install:
	install -D doc/gc.man debian/tmp/usr/share/man/man3/gc_malloc.3
	dh_install
	rm debian/libgc-dev/usr/share/doc/libgc1/README.environment

override_dh_auto_clean:
	dh_auto_clean
	rm -rf autom4te.cache build-static build-dynamic

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog