File: rules

package info (click to toggle)
mdk 1.2.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,096 kB
  • sloc: ansic: 22,283; sh: 4,951; lisp: 1,248; lex: 826; makefile: 562; yacc: 288
file content (32 lines) | stat: -rwxr-xr-x 870 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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

export CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
export CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS)
export LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed

include /usr/share/hardening-includes/hardening.make
ifeq (,$(filter nohardening,$(DEB_BUILD_OPTIONS)))
CFLAGS+=	$(HARDENING_CFLAGS)
LDFLAGS+=	$(HARDENING_LDFLAGS)
endif

get-orig-source:
	. debian/get-orig-source.sh
	
ifneq (,$(filter werror,$(DEB_BUILD_OPTIONS)))
override_dh_auto_configure:
	dh_auto_configure
	find . -type f -name Makefile -exec sed -i -e "s/^CFLAGS *=.*/& -Werror/" {} \;
endif

override_dh_auto_test:
	[ -f po/POTFILES.skip ] || cp debian/POTFILES.skip po/
	dh_auto_test

override_dh_installchangelogs:
	dh_installchangelogs NEWS

%:
	dh $@ --with autotools_dev