File: rules

package info (click to toggle)
qtwebkit 2.3.4.dfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 290,632 kB
  • sloc: cpp: 1,417,515; python: 85,048; ansic: 39,357; perl: 38,862; ruby: 10,313; objc: 9,505; xml: 8,679; asm: 3,864; yacc: 2,458; sh: 1,237; lex: 813; makefile: 592; java: 228; php: 79
file content (68 lines) | stat: -rwxr-xr-x 2,697 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
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
#!/usr/bin/make -f

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

export DEB_CFLAGS_MAINT_STRIP = -g
export DEB_CXXFLAGS_MAINT_STRIP = -g
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# only enable debugging symbols on archs supporting -gstabs
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), amd64 i386 powerpc s390x))
    export DEB_CFLAGS_MAINT_APPEND = -gstabs
    export DEB_CXXFLAGS_MAINT_APPEND = -gstabs
endif
ifneq (,$(filter $(DEB_HOST_ARCH),alpha))
    export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-relax
endif

CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)

QMAKE_ARGS := "--qmakearg=\"QMAKE_CFLAGS_RELEASE=$(CFLAGS) $(CPPFLAGS)\""
QMAKE_ARGS += "--qmakearg=\"QMAKE_CXXFLAGS_RELEASE=$(CXXFLAGS) $(CPPFLAGS)\""
QMAKE_ARGS += "--qmakearg=\"QMAKE_LFLAGS_RELEASE=$(LDFLAGS)\""

# Respect the number of parallel jobs
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
        NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
        MAKE_ARGS := --makeargs="-j$(NUMJOBS)"
endif

export QMAKEPATH=Tools/qmake
export QTDIR=/usr
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

%:
	dh $@ --parallel --fail-missing --dbg-package=libqtwebkit4-dbg --with pkgkde_symbolshelper

override_dh_auto_clean:
	rm -rf WebKitBuild
	find . -name *.pyc | xargs rm -vf

override_dh_auto_configure:
	true

override_dh_auto_build:
	#disable JIT assembler on archs where it doesn't compile
	#disable WTF_USE_3D_GRAPHICS on ARM where it doesn't compile
	#disable forcing SSE2 on all other platforms
ifneq (,$(filter alpha arm64 armel hppa m68k mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390x sh4 sparc64 x32,$(DEB_HOST_ARCH)))
	./Tools/Scripts/build-webkit --qt DEFINES+=ENABLE_JIT=0 DEFINES+=ENABLE_YARR_JIT=0 DEFINES+=ENABLE_ASSEMBLER=0 $(QMAKE_ARGS) $(MAKE_ARGS)
else ifeq ($(DEB_HOST_ARCH),armhf)
	./Tools/Scripts/build-webkit --qt DEFINES+=WTF_USE_3D_GRAPHICS=0 DEFINES+=ENABLE_JIT=0 DEFINES+=ENABLE_YARR_JIT=0 DEFINES+=ENABLE_ASSEMBLER=0 $(QMAKE_ARGS) $(MAKE_ARGS)
else
	./Tools/Scripts/build-webkit --qt $(QMAKE_ARGS) $(MAKE_ARGS) --no-force-sse2
endif

override_dh_auto_install:
	dh_auto_install -- INSTALL_ROOT=$(CURDIR)/debian/tmp -C WebKitBuild/Release

prune-nonfree:
	rm -fv ManualTests/plugins/test.swf
	rm -fv ManualTests/plugins/timeout-dialog-displayed-over-navigation.swf
	rm -fv ManualTests/resources/spinbox.swf
	rm -fv Tools/TestResultServer/static-dashboards/dygraph-combined.js