File: rules

package info (click to toggle)
bomstrip 9-15
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 252 kB
  • sloc: pascal: 41; ansic: 34; cpp: 34; java: 33; python: 31; sh: 24; makefile: 20; perl: 7; php: 6; ruby: 6; haskell: 6; awk: 2; sed: 1
file content (32 lines) | stat: -rwxr-xr-x 1,085 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
#!/usr/bin/make -f
#
# Debhelper rules for bomstrip, the UTF-8 BOM strip utility
# Written by Peter Pentchev in 2008.
# This file is hereby placed into the public domain.

# Aim for the top, adapt if anything should break on the buildds.
DEB_BUILD_MAINT_OPTIONS=	hardening=+all
export DEB_BUILD_MAINT_OPTIONS

DEB_CPPFLAGS_MAINT_APPEND=	-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700
DEB_CFLAGS_MAINT_APPEND=	-pipe -Wall -W -ansi -pedantic -Wbad-function-cast \
		-Wcast-align -Wcast-qual -Wchar-subscripts -Winline \
		-Wmissing-prototypes -Wnested-externs -Wpointer-arith \
		-Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings
ifneq (,$(filter werror,$(DEB_BUILD_OPTIONS)))
	DEB_CFLAGS_MAINT_APPEND+=	-Werror
endif
export DEB_CFLAGS_MAINT_APPEND DEB_CPPFLAGS_MAINT_APPEND

include /usr/share/dpkg/buildtools.mk

override_dh_auto_build:
	${CC} -c ${CPPFLAGS} ${CFLAGS} bomstrip.c
	${CC} ${LDFLAGS} -o bomstrip bomstrip.o
	sed -e "s@'bomstrip'@/usr/bin/bomstrip@" < debian/bomstrip-files.sh > bomstrip-files

override_dh_auto_test:
	env BOM=./bomstrip sh test.sh

%:
	dh $@