File: rules

package info (click to toggle)
uftrace 0.6.0.20161014-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 1,940 kB
  • ctags: 3,404
  • sloc: ansic: 24,586; python: 3,663; makefile: 585; asm: 242; sh: 135; cpp: 117
file content (34 lines) | stat: -rwxr-xr-x 918 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
#!/usr/bin/make -f
#
# don't use $(MAKE) for the sub-makes here; having MAKEFLAGS=w active for
# config/Makefile makes its subshell `make` invocation produce output, which
# causes Make to try and parse that output as Makefile contents, which breaks.

%:
	dh $@

MAKEVARS := \
	V=1 \
	DESTDIR=$(CURDIR)/debian/tmp/ \
	CFLAGS_uftrace=-fPIE \
	CFLAGS_traceevent=-fPIE \
	LDFLAGS_uftrace=-pie

override_dh_auto_configure:
	LDFLAGS=-Wl,-z,now,-z,relro ./configure --prefix=/usr --libdir=/usr/lib/uftrace

override_dh_auto_build:
	MAKEFLAGS= make $(MAKEVARS)

override_dh_auto_install:
	MAKEFLAGS= make install $(MAKEVARS)

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	@# strip out ansi codes that are apparently not opt-outable in tests/unittest.c
	MAKEFLAGS= make test $(MAKEVARS) | sed -e "$$(printf 's/\033\\[[0-9;]*m//g')"
endif

override_dh_auto_clean:
	MAKEFLAGS= make clean
	$(RM) .config