File: rules

package info (click to toggle)
webkit 1.2.7-0%2Bsqueeze2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 44,028 kB
  • ctags: 70,264
  • sloc: cpp: 416,404; ansic: 12,370; sh: 10,209; perl: 4,094; yacc: 3,555; xml: 91; makefile: 90
file content (124 lines) | stat: -rwxr-xr-x 3,154 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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

CFLAGS = -g -Wall

ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O2
else
        CFLAGS += -O0
endif

ifeq ($(DEB_BUILD_ARCH),alpha)
        CFLAGS += -Wl,--no-relax
endif

ifeq ($(DEB_BUILD_ARCH),s390)
        CFLAGS += -gstabs
endif

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	MAKEARGUMENTS += -j$(NUMJOBS)
endif

clean:
	dh_testdir
	dh_testroot

	rm -f build-stamp install-stamp
	-test -d build/WebKit/gtk/docs && cd build/WebKit/gtk/docs && \
	    make maintainer-clean
	rm -rf build
	rm -f WebKit/gtk/docs/version.xml

	dh_clean

build: build-stamp

build-stamp:
	dh_testdir

	[ ! -d build ] && mkdir build || true
	cd build && \
	CFLAGS="$(CFLAGS)" \
	CXXFLAGS="$(CFLAGS)" \
	CC="gcc -Wl,--as-needed" \
	CXX="g++ -Wl,--as-needed" \
	../configure --prefix=/usr \
		--host=$(DEB_HOST_GNU_TYPE) \
		--build=$(DEB_BUILD_GNU_TYPE) \
		--enable-gtk-doc \
		--enable-introspection

	$(MAKE) $(MAKEARGUMENTS) -C build

	# Awesome hack to get the docs built! For some reason, the
	# first call to make docs fails mid-work, but the second
	# succeeds.
	ln -fs ../../../build/WebKit/gtk/docs/version.xml WebKit/gtk/docs
	cd build/WebKit/gtk/docs && make docs

	touch $@

install: install-stamp

install-stamp: build-stamp
	dh_testdir
	dh_testroot

	dh_clean -k

	$(MAKE) -C build install DESTDIR="$(CURDIR)"/debian/tmp
	[ ! -d debian/tmp/usr/lib/webkit-1.0-2/libexec ] && install -d -m 755 debian/tmp/usr/lib/webkit-1.0-2/libexec || true
	build/libtool --mode=install install -m 755 build/Programs/DumpRenderTree "$(CURDIR)"/debian/tmp/usr/lib/webkit-1.0-2/libexec/DumpRenderTree
	chrpath -d "$(CURDIR)"/debian/tmp/usr/lib/webkit-1.0-2/libexec/DumpRenderTree
	build/libtool --mode=install install -m 755 build/Programs/GtkLauncher "$(CURDIR)"/debian/tmp/usr/lib/webkit-1.0-2/libexec/GtkLauncher
	chrpath -d "$(CURDIR)"/debian/tmp/usr/lib/webkit-1.0-2/libexec/GtkLauncher

	install -d -m 755 debian/tmp/usr/share/doc/libwebkit-dev/html
	install -m 644 WebKit/gtk/docs/html/* debian/tmp/usr/share/doc/libwebkit-dev/html/

	touch $@

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs -i
	dh_installchangelogs -i
	dh_install -i --sourcedir=debian/tmp
	dh_link -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs -a
	dh_installchangelogs -a
	dh_install -a --sourcedir=debian/tmp
	dh_link -a
	dh_strip -a --dbg-package=libwebkit-1.0-2-dbg
	dh_compress -a
	dh_fixperms -a
	dh_makeshlibs -a -V 'libwebkit-1.0-2 (>= 1.1.90)' -- -c4
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch

.PHONY: build clean install binary binary-indep binary-arch