]> git.saurik.com Git - wxWidgets.git/blame - debian/rules
[ 1517666 ] suppression of wxVsnprintf() warnings - with little extensions.
[wxWidgets.git] / debian / rules
CommitLineData
e4c4c1c6 1#!/usr/bin/make -f
e1293dcf 2# debian/rules file to build packages from wx CVS source
e4c4c1c6
RL
3#
4# Sculpted 13/2/2000 by Ron Lee <ron@debian.org> from new and
5# variously stolen code :-)
f6bcfd97
BP
6# It makes copious use of the debhelper utilities written by
7# Joey Hess and others.
e4c4c1c6
RL
8
9#export DH_VERBOSE=1
f6bcfd97 10export DH_OPTIONS
e4c4c1c6 11
6de5430b 12ifdef CONCURRENCY_LEVEL
6181913e 13
6de5430b
RD
14 # A user who knows what they want, that's like gold...
15 # respect their precious opinion of how much blue smoke to use.
16 JOB_COUNT := $(CONCURRENCY_LEVEL)
17
18else ifdef DISTCC_HOSTS
19
20 # Otherwise, if they have a cluster, try to put it to good use.
6181913e 21 JOB_COUNT := $(shell set $${DISTCC_HOSTS} > /dev/null 2>&1 ; echo $$\#)
6181913e 22
6de5430b
RD
23 # Not much faster, but it might keep you warm in winter...
24 #JOB_COUNT := $(shell set $${DISTCC_HOSTS} > /dev/null 2>&1 ; echo $$(($$\# + $$\#)))
6181913e 25
6de5430b 26endif
6181913e 27
6de5430b
RD
28ifdef JOB_COUNT
29 FAST_MAKE = $(MAKE) -j $(JOB_COUNT)
30else
31 FAST_MAKE = $(MAKE)
6181913e
RL
32endif
33
34-include debian/python-version
35
ceec2216 36
6de5430b
RD
37# If another source package is to supply the common binary packages
38# for a particular Debian release, then define this variable to indicate
39# the $(release) that is expected to provide it. Do not define it at
40# all if this is to be the default (or only) wx source package for the
41# target release.
42#
43# for etch:
44#DEBIAN_WX_DEFAULT_VERSION = 2.6
45
46
ceec2216
RL
47# This will extract a flavour out of the name of the source directory
48# and flavour the packages and binaries with it. 'Official' builds
49# should use a source dir of the form wxwidgets$RELEASE-$VERSION.
50# Flavoured builds may use wxwidgets$RELEASE-$FLAVOUR-$VERSION, where
51# any descriptive alphanumeric name will do for FLAVOUR. This will
52# allow a custom build to be installed alongside the mainline ones
53# without conflict. You will also need to make a corresponding
54# changelog entry for your flavour source package using:
55# wxwidget$RELEASE-$FLAVOUR ($VERSION) to satify dpkg-source and
56# to correctly set the release below.
57DEBIAN_WXFLAVOUR := $(shell pwd | sed -e 's@.*/wxwidgets[0-9.]\+-\?\(.*\)-[0-9.]\+-\?.*@\1@')
58
148e141b 59release := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p')
ceec2216 60
6de5430b
RD
61# This is broken completely now by bakefiles changes. Until we add
62# some hocus pocus to the main tree, to export these values from it
63# again, we approximate its behaviour (fairly precisely fwiw) to
64# specify $soversion below. Re-automate if incompatible changes
65# result in it actually changing.
66#soversion := $(shell grep '^WX_CURRENT=' configure.in | sed 's/WX_CURRENT=\([0-9]\+\).*/\1/')
67soversion := 0
68sorelease := $(release:%-$(DEBIAN_WXFLAVOUR)=%)-$(soversion)$(addprefix -,$(DEBIAN_WXFLAVOUR))
69
70# Base value for alternative priorities.
71alt_prio := $(subst .,,$(release))
72
73pytoolkit := gtk2
e653e181 74pydir := usr/lib/$(python_ver)/site-packages
b945df00 75wxpydir := $(pydir)/wx-$(release)-$(pytoolkit)
e653e181 76
6de5430b
RD
77cross_host := i586-mingw32msvc
78cross_build := $(shell ./config.guess)
3a922bb4 79
e1293dcf
RL
80config_cache = ../config_deb.cache
81config_cache_cross = ../config_deb_cross.cache
a0b03701 82
6de5430b 83
b945df00
VZ
84# build options
85COMMON_CONFIGURE_OPTIONS = \
86 --prefix=/usr \
87 --cache-file=$(config_cache) \
88 --with-flavour=$(DEBIAN_WXFLAVOUR) \
89 --enable-debug \
90 --with-zlib=sys \
91 --disable-reserved_virtual \
92
93BASE_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
94 --disable-gui \
95
96GTK_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
97 --with-gtk \
98 --with-gnomeprint \
8e051259
RD
99 --enable-mediactrl \
100 --enable-sound \
101 --with-sdl \
102 --enable-display \
b945df00
VZ
103 --with-libjpeg=sys \
104 --with-libpng=sys \
105 --with-libtiff=sys \
106
107
108PY_WX_CONFIG_OPTIONS = --version=$(release) --toolkit=$(pytoolkit) --static=no
109
110WX_UNICODE := 1
111WX_OPENGL := 1
112
113ifeq ($(WX_UNICODE),1)
114 COMMON_CONFIGURE_OPTIONS += --enable-unicode
115 PY_WX_CONFIG_OPTIONS += --unicode
116 PY_UNICODE="UNICODE=1"
8e051259 117 wxpydir := $(pydir)/wx-$(release)-$(pytoolkit)-unicode
b945df00
VZ
118endif
119
120ifeq ($(WX_OPENGL),1)
121 GTK_CONFIGURE_OPTIONS += --with-opengl
122else
123 GTK_CONFIGURE_OPTIONS += --without-opengl
124endif
125
e0a4aa8a 126# Packages to build:
6de5430b
RD
127package_wxbase_lib := libwxbase$(sorelease)
128package_wxbase_dev := libwxbase$(release)-dev
129package_wxbase_dbg := libwxbase$(release)-dbg
130
131package_gtk_lib := libwxgtk$(sorelease)
132package_gtk_dev := libwxgtk$(release)-dev
133package_gtk_dbg := libwxgtk$(release)-dbg
134
135
136
137
138package_gtk_py_lib := python-wxgtk$(release)
139package_gtk_py_ver = python-wxversion
140package_gtk_py_tools = python-wxtools
141
142package_headers := wx$(release)-headers
143package_i18n := wx$(release)-i18n
144package_doc := wx$(release)-doc
145package_examples := wx$(release)-examples
146package_common = wx-common
147
148# The packages listed here are common to all wx versions, and may be provided
149# by another source package if more than one is in the release simultaneously.
150common_packages := $(package_common) $(package_gtk_py_ver) $(package_gtk_py_tools)
151
152
153package_gtk_dbg_py := python-wxgtk$(release)-dbg
154
155
156
157package_msw_dev := libwxmsw$(release)-dev
158package_msw_dbg := libwxmsw$(release)-dbg
159package_headers_msw := wx$(release)-headers-msw
160
161# The packages listed here will not be built by default.
162extra_packages := $(package_gtk_dbg_py) \
163 $(package_msw_dev) $(package_msw_dbg) $(package_headers_msw)
164
165ifdef DEBIAN_WX_DEFAULT_VERSION
166
167 extra_packages += $(common_packages)
168
169endif
170
3a922bb4 171
e0a4aa8a 172# Build directories:
6de5430b
RD
173objdir_wxbase_shared = objs_wxbase_sh
174objdir_wxbase_debug = objs_wxbase_d
e1293dcf 175objdir_gtk_shared = objs_gtk_sh
e1293dcf
RL
176objdir_gtk_debug = objs_gtk_d
177objdir_gtk_install = objs_gtk_install
e1293dcf
RL
178objdir_doc_cruft = objs_doc_con
179objdir_doc = docs/wx-manual.html
180objdir_examples = docs/examples
181objdir_i18n = locale
182
183objdir_msw_shared = objs_msw_sh
184objdir_msw_static = objs_msw_st
185objdir_msw_dbg = objs_msw_d
148e141b 186objdir_msw_install = objs_msw_install
e1293dcf 187
6de5430b
RD
188objdirs := $(objdir_wxbase_shared) $(objdir_wxbase_debug) \
189 $(objdir_gtk_shared) $(objdir_gtk_debug) $(objdir_gtk_install) \
190 $(objdir_doc_cruft) $(objdir_doc) $(objdir_examples) \
191 $(objdir_msw_shared) $(objdir_msw_static) $(objdir_msw_dbg) \
192 $(objdir_msw_install)
e4c4c1c6 193
afa3e1ed
RL
194# note that the i18n package is actually arch indep (once built)
195# but must be built (and installed) during the arch any phase as
e1293dcf 196# it's pulled out of the wxGTK shared lib package.
6de5430b
RD
197#
198# similarly some of the wxpython packages are arch indep too, but
199# all files for it are installed during the arch any phase.
e1293dcf 200
afa3e1ed 201
050207ec 202# Build stamps:
6de5430b
RD
203build_arch_stamps = build-wxbase-shared-stamp build-wxbase-debug-stamp \
204 build-gtk-shared-stamp build-gtk-shared-contrib-stamp \
ceec2216 205 build-gtk-debug-stamp build-gtk-debug-contrib-stamp \
e1293dcf 206 build-i18n-stamp build-gtk-py-stamp
e4c4c1c6 207
6de5430b 208build_indep_stamps = build-examples-stamp build-doc-stamp
0ecfbbea 209
6de5430b 210build_cross_stamps = build-msw-shared-stamp build-msw-static-stamp build-msw-dbg-stamp
3a922bb4 211
6de5430b 212build_stamps_native := $(build_arch_stamps) $(build_indep_stamps)
3a922bb4 213
6de5430b 214build_stamps := $(build_stamps_native) $(build_cross_stamps)
050207ec 215
050207ec 216
e1293dcf 217# Install targets:
6de5430b
RD
218install_all_arch = install-wxbase-lib install-wxbase-dev install-wxbase-dbg \
219 install-gtk-lib install-gtk-dev install-gtk-dbg \
220 install-headers install-i18n \
148e141b 221 install-gtk-py
0ecfbbea 222
6de5430b
RD
223ifndef DEBIAN_WX_DEFAULT_VERSION
224
225 install_all_arch += install-common
226
227endif
228
229install_all_indep = install-examples install-doc
050207ec 230
6de5430b 231install_all_cross = install-msw-dev install-msw-dbg install-headers-msw
3a922bb4 232
6de5430b 233install_all_native := $(install_all_arch) $(install_all_indep)
3a922bb4 234
6de5430b 235install_all := $(install_all_native) $(install_all_cross)
e4c4c1c6
RL
236
237
6de5430b 238# wxPython uses this to build in-tree
3b57de8b
RL
239wxconfig := $(shell pwd)/$(objdir_gtk_shared)/wx-config --no_rpath
240wxconfig-dbg := $(shell pwd)/$(objdir_gtk_debug)/wx-config --no_rpath
afa3e1ed 241
6de5430b 242# and this after it is installed.
b945df00
VZ
243py_wxconfig := wx-config $(PY_WX_CONFIG_OPTIONS) --debug=no
244pyd_wxconfig := wx-config $(PY_WX_CONFIG_OPTIONS) --debug
6de5430b
RD
245
246
ceec2216 247#contrib_libs := $(subst CVS,,$(notdir $(wildcard contrib/include/wx/*)))
b63b07a8 248
afa3e1ed 249
e0a4aa8a
RL
250# The Rules:
251
6181913e
RL
252debian/python-version:
253 echo python_ver := python$(shell python -c "import sys;print sys.version[:3]") > $@
254
255debian/control: $(addprefix debian/,control.in python-version)
6de5430b 256 sed -e 's/=V/$(release)/g;s/=SOV/$(sorelease)/g;s/=PY/$(python_ver)/g'\
148e141b 257 < debian/control.in > debian/control
e4c4c1c6 258
3a922bb4 259control-files-stamp: debian/control
f6bcfd97 260 dh_testdir
6de5430b
RD
261 @for f in postinst prerm; do \
262 echo "generating control file $(package_wxbase_dev).$$f"; \
263 sed -e 's/=V/$(release)/g; '\
264' s/=PRIO/$(alt_prio)/g' \
265 < debian/libwxbase-dev.$$f \
266 > debian/$(package_wxbase_dev).$$f; \
267 done;
268 @for f in postinst prerm; do \
269 echo "generating control file $(package_wxbase_dbg).$$f"; \
270 sed -e 's/=V/$(release)/g; '\
271' s/=PRIO/$(alt_prio)/g' \
272 < debian/libwxbase-dbg.$$f \
273 > debian/$(package_wxbase_dbg).$$f; \
274 done;
ceec2216 275 @for f in postinst prerm; do \
e1293dcf 276 echo "generating control file $(package_gtk_dev).$$f"; \
6de5430b
RD
277 sed -e 's/=V/$(release)/g; '\
278' s/=PRIO/$(alt_prio)/g' \
279 < debian/libwxgtk-dev.$$f \
e1293dcf 280 > debian/$(package_gtk_dev).$$f; \
f6bcfd97 281 done;
ceec2216 282 @for f in postinst prerm; do \
e1293dcf 283 echo "generating control file $(package_gtk_dbg).$$f"; \
6de5430b
RD
284 sed -e 's/=V/$(release)/g; '\
285' s/=PRIO/$(alt_prio)/g' \
286 < debian/libwxgtk-dbg.$$f \
e1293dcf 287 > debian/$(package_gtk_dbg).$$f; \
f6bcfd97 288 done;
fdefae19
RL
289 @for f in docs postinst prerm; do \
290 echo "generating control file $(package_gtk_py_lib).$$f"; \
6de5430b
RD
291 sed -e 's/=PY/$(python_ver)/g; '\
292' s|=WXPYDIR|$(wxpydir)|g; '\
293' s/=V/$(release)/g; '\
294' s/=PRIO/$(alt_prio)/g' \
9372855d 295 < debian/python-wxgtk.$$f \
fdefae19 296 > debian/$(package_gtk_py_lib).$$f; \
f6bcfd97 297 done;
6de5430b 298 @for f in postinst prerm; do \
fdefae19 299 echo "generating control file $(package_gtk_dbg_py).$$f"; \
6de5430b
RD
300 sed -e 's/=PY/$(python_ver)/g; '\
301' s/=V/$(release)/g; '\
302' s/=PRIO/$(alt_prio)/g' \
303 < debian/python-wxgtk-dbg.$$f \
fdefae19
RL
304 > debian/$(package_gtk_dbg_py).$$f; \
305 done;
6de5430b
RD
306 @echo "generating control file $(package_gtk_dbg_py).docs";
307 @cp debian/python-wxgtk.docs debian/$(package_gtk_dbg_py).docs;
e1293dcf
RL
308 @for f in docs doc-base; do \
309 echo "generating control file $(package_doc).$$f"; \
b63b07a8 310 sed -e 's/=V/$(release)/g' < debian/wx-doc.$$f \
e1293dcf 311 > debian/$(package_doc).$$f; \
f6bcfd97 312 done;
e1293dcf
RL
313 @for f in examples; do \
314 echo "generating control file $(package_examples).$$f"; \
b63b07a8 315 cp debian/wx-examples.$$f debian/$(package_examples).$$f; \
f6bcfd97 316 done;
ceec2216 317 @for f in postinst prerm; do \
e1293dcf 318 echo "generating control file $(package_msw_dev).$$f"; \
6de5430b
RD
319 sed -e 's/=V/$(release)/g; '\
320' s/=H/$(cross_host)/g; '\
321' s/=PRIO/$(alt_prio)/g' \
322 < debian/libwxmsw-dev.$$f \
e1293dcf 323 > debian/$(package_msw_dev).$$f; \
3a922bb4 324 done;
ceec2216 325 @for f in postinst prerm; do \
e1293dcf 326 echo "generating control file $(package_msw_dbg).$$f"; \
6de5430b
RD
327 sed -e 's/=V/$(release)/g; '\
328' s/=H/$(cross_host)/g; '\
329' s/=PRIO/$(alt_prio)/g' \
330 < debian/libwxmsw-dbg.$$f \
e1293dcf 331 > debian/$(package_msw_dbg).$$f; \
4fb788e4 332 done;
148e141b
RL
333# @echo "generating control file $(package_common).menu"; \
334# sed -e 's/=V/$(release)/g' < debian/wx-common.menu \
335# > debian/$(package_common).menu;
ceec2216 336 @echo "generating control file lintian-override"; \
6de5430b
RD
337 sed -e 's/=V/$(release)/g; '\
338' s/=SOV/$(sorelease)/g' \
339 < debian/lintian-override.in \
ceec2216 340 > debian/lintian-override; \
f6bcfd97
BP
341 touch $@
342
050207ec 343build_arch: control-files-stamp $(build_arch_stamps)
3a922bb4 344build_all: control-files-stamp $(build_stamps_native)
3abb92ce 345
3a922bb4
RL
346# Really we should probably do nothing here until we know which
347# binary target is being called, but alpha builds were exploding
348# (compiler segfaults) in random places when building under fakeroot
349# from the binary-arch target. Build all -arch files here then, and
350# let the -indep stuff fend for itself later.
351
352build: build_arch
050207ec 353
e4c4c1c6 354
6de5430b
RD
355# The wx2.6 build system makes us run around in circles to get a separate
356# libwxbase. We need to configure it here in order to get the correct
357# config files to use it alone, but there is no point building it as the
358# wxgtk build is going to do that again anyway. We'll move the relevant
359# files out when that is done.
360
361configure-wxbase-shared-stamp:
362 dh_testdir
363 mkdir -p $(objdir_wxbase_shared)
b945df00
VZ
364 cd $(objdir_wxbase_shared) \
365 && ../configure $(BASE_CONFIGURE_OPTIONS)
6de5430b
RD
366 touch $@
367
368build-wxbase-shared-stamp: configure-wxbase-shared-stamp
369 dh_testdir
370 # Nothing to build here, move along...
371 #cd $(objdir_wxbase_shared) && $(FAST_MAKE)
372 touch $@
373
374configure-wxbase-debug-stamp:
375 dh_testdir
376 mkdir -p $(objdir_wxbase_debug)
377 cd $(objdir_wxbase_debug) \
b945df00 378 && ../configure $(BASE_CONFIGURE_OPTIONS) --enable-debug
6de5430b
RD
379 touch $@
380
381build-wxbase-debug-stamp: configure-wxbase-debug-stamp
382 dh_testdir
383 # Nothing to build here, move along...
384 #cd $(objdir_wxbase_debug) && $(FAST_MAKE)
385 touch $@
386
8ddf18dd 387configure-gtk-shared-stamp:
e4c4c1c6 388 dh_testdir
3a922bb4 389 mkdir -p $(objdir_gtk_shared)
e4c4c1c6 390 cd $(objdir_gtk_shared) \
b945df00 391 && ../configure $(GTK_CONFIGURE_OPTIONS)
8ddf18dd
RL
392 touch $@
393
394build-gtk-shared-stamp: configure-gtk-shared-stamp
395 dh_testdir
6181913e 396 cd $(objdir_gtk_shared) && $(FAST_MAKE)
e4c4c1c6
RL
397 touch $@
398
8ddf18dd
RL
399
400configure-gtk-debug-stamp:
f6bcfd97 401 dh_testdir
3a922bb4 402 mkdir -p $(objdir_gtk_debug)
f6bcfd97 403 cd $(objdir_gtk_debug) \
b945df00 404 && ../configure $(GTK_CONFIGURE_OPTIONS) --enable-debug
f6bcfd97
BP
405 touch $@
406
8ddf18dd
RL
407build-gtk-debug-stamp: configure-gtk-debug-stamp
408 dh_testdir
6181913e 409 cd $(objdir_gtk_debug) && $(FAST_MAKE)
8ddf18dd
RL
410 touch $@
411
7b7a7637 412
ceec2216 413build-gtk-shared-contrib-stamp: build-gtk-shared-stamp
f6bcfd97 414 dh_testdir
6181913e 415 cd $(objdir_gtk_shared)/contrib/src && $(FAST_MAKE)
a13a7f89 416 cd $(objdir_gtk_shared)/utils/wxrc && $(FAST_MAKE)
f6bcfd97
BP
417 touch $@
418
f6bcfd97 419
ceec2216
RL
420build-gtk-debug-contrib-stamp: build-gtk-debug-stamp
421 dh_testdir
422 cd $(objdir_gtk_debug)/contrib/src && $(FAST_MAKE)
423 touch $@
424
425
6181913e
RL
426purge-dbg-py:
427 @if [ ! -e build-gtk-py-stamp ]; then \
428 $(MAKE) -f debian/rules clean-py; \
429 fi
430 $(RM) build-gtk-dbg-py-stamp
431
432build-gtk-py-stamp: build-gtk-shared-stamp purge-dbg-py
e0a4aa8a 433 dh_testdir
050207ec
RL
434 touch docs/lgpl.txt
435 cd wxPython \
b63b07a8
RL
436 && $(python_ver) ./setup.py build \
437 WX_CONFIG='$(wxconfig)' \
6de5430b 438 WXPORT=$(pytoolkit) \
b945df00 439 $(PY_UNICODE) \
fdefae19 440 FLAVOUR=$(DEBIAN_WXFLAVOUR)
e0a4aa8a
RL
441 touch $@
442
f538864d
RL
443build-doc-stamp: build-gtk-shared-stamp
444 dh_testdir
ceec2216 445 cd $(objdir_gtk_shared)/utils/tex2rtf/src && $(FAST_MAKE)
e1293dcf 446 rm -rf $(objdir_doc)
b63b07a8 447 rm -rf $(objdir_doc_cruft)
e0a4aa8a
RL
448 mkdir $(objdir_doc)
449 mkdir $(objdir_doc_cruft)
450 cd $(objdir_doc_cruft) \
3a922bb4 451 && LD_LIBRARY_PATH=../$(objdir_gtk_shared)/lib:$(LD_LIBRARY_PATH) \
ceec2216
RL
452 ../$(objdir_gtk_shared)/utils/tex2rtf/src/tex2rtf \
453 ../docs/latex/wx/manual.tex \
454 ../$(objdir_doc)/wx$(release)-manual.html \
455 -twice -html
e0a4aa8a
RL
456 cp docs/latex/wx/*.gif $(objdir_doc)
457 rm -rf $(objdir_doc_cruft)
7714864e 458 rm -f $(objdir_doc)/wx$(release)-manual.{con,hh*,htx,ref}
f538864d
RL
459 touch $@
460
3a922bb4 461build-examples-stamp: build-gtk-shared-stamp
5c0e67b2 462 dh_testdir
3a922bb4
RL
463 mkdir -p $(objdir_examples)
464
465 # copy all samples and the Makefile generated for libwxgtk.
5c0e67b2 466 cp -a samples $(objdir_examples)
3a922bb4
RL
467 rm -f $(objdir_examples)/samples/Makefile
468 cp -a $(objdir_gtk_shared)/samples/Makefile $(objdir_examples)/samples
469
5259a417
RL
470 cd $(objdir_examples)/samples \
471 && find -name 'Makefile.in' -exec rm -f '{}' ';' \
472 && for d in $$(find -type d); do \
473 if [ -f $$d/makefile.unx ]; then \
474 mv $$d/makefile.unx $$d/Makefile; \
475 fi; \
476 done \
477
f6bcfd97 478 cp -a wxPython/demo $(objdir_examples)/wxPython
5259a417 479
6de5430b
RD
480 echo "generating install_examples.sh script";
481 sed -e 's/=V/$(release)/g' < debian/unpack_examples.sh.in \
482 > debian/unpack_examples.sh
483 chmod 755 debian/unpack_examples.sh
484
5c0e67b2
RL
485 touch $@
486
3ca6a5f0
BP
487build-i18n-stamp: build-gtk-shared-stamp
488 dh_testdir
54abcc91
RL
489
490 # touch .po files first, since if they are not already up
491 # to date then _now_ is not the time to fix it.
492 # That should have been been done before cvs was tagged.
3ca6a5f0 493 cd $(objdir_i18n) \
54abcc91 494 && touch *.po \
3ca6a5f0
BP
495 && $(MAKE) allmo
496 touch $@
497
6181913e
RL
498purge-release-py:
499 @if [ ! -e build-gtk-dbg-py-stamp ]; then \
500 $(MAKE) -f debian/rules clean-py; \
501 fi
502 $(RM) build-gtk-py-stamp
503
504build-gtk-dbg-py-stamp: build-gtk-debug-stamp purge-release-py
505 dh_testdir
506 touch docs/lgpl.txt
ceec2216 507 cd wxPython \
148e141b
RL
508 && $(python_ver) ./setup.py build \
509 WX_CONFIG='$(wxconfig-dbg)' \
6de5430b 510 WXPORT=$(pytoolkit) \
b945df00 511 $(PY_UNICODE) \
fdefae19 512 FLAVOUR=$(addsuffix -,$(DEBIAN_WXFLAVOUR))dbg
6181913e
RL
513 touch $@
514
8ddf18dd
RL
515
516configure-msw-shared-stamp:
3a922bb4 517 dh_testdir
978f1259 518 mkdir -p $(objdir_msw_shared)
ceec2216
RL
519 cd $(objdir_msw_shared) \
520 && ../configure --prefix=/usr/$(cross_host) \
521 --cache-file=$(config_cache_cross) \
522 --host=$(cross_host) \
523 --build=$(cross_build) \
524 --with-flavour=$(DEBIAN_WXFLAVOUR)
4fb788e4
RL
525 touch $@
526
8ddf18dd
RL
527build-msw-shared-stamp: configure-msw-shared-stamp
528 dh_testdir
6181913e 529 cd $(objdir_msw_shared) && $(FAST_MAKE)
8ddf18dd
RL
530 touch $@
531
532configure-msw-static-stamp:
978f1259
RL
533 dh_testdir
534 mkdir -p $(objdir_msw_static)
ceec2216
RL
535 cd $(objdir_msw_static) \
536 && ../configure --prefix=/usr/$(cross_host) \
537 --cache-file=$(config_cache_cross) \
538 --host=$(cross_host) \
539 --build=$(cross_build) \
540 --with-flavour=$(DEBIAN_WXFLAVOUR) \
8ddf18dd 541 --disable-shared
978f1259
RL
542 touch $@
543
8ddf18dd
RL
544build-msw-static-stamp: configure-msw-static-stamp
545 dh_testdir
6181913e 546 cd $(objdir_msw_static) && $(FAST_MAKE)
8ddf18dd
RL
547 touch $@
548
549configure-msw-dbg-stamp:
4fb788e4
RL
550 dh_testdir
551 mkdir -p $(objdir_msw_dbg)
ceec2216
RL
552 cd $(objdir_msw_dbg) \
553 && ../configure --prefix=/usr/$(cross_host) \
554 --cache-file=$(config_cache_cross) \
555 --host=$(cross_host) \
556 --build=$(cross_build) \
557 --with-flavour=$(DEBIAN_WXFLAVOUR) \
8ddf18dd
RL
558 --enable-debug
559 touch $@
560
561build-msw-dbg-stamp: configure-msw-dbg-stamp
562 dh_testdir
6181913e 563 cd $(objdir_msw_dbg) && $(FAST_MAKE)
3a922bb4
RL
564 touch $@
565
566
6181913e 567clean-py:
148e141b 568 cd wxPython && rm -rf licence build* docs/xml-raw wx/*.py
6181913e
RL
569
570 # What to do about src/__version__.py ???
54abcc91 571
5259a417 572
0ecfbbea
RL
573# We do the equivalent of this above by removing build, unfortunately
574# its not enough by itself to get the tree properly clean again.
575# && ./setup.py clean
576
6181913e
RL
577clean: debian/control clean-py
578 dh_testdir
579 dh_testroot
580
581 rm -rf config_deb.cache config_deb_cross.cache *-stamp $(objdirs)
582 rm -f docs/lgpl.txt
583 rm -f $(objdir_i18n)/*.mo
584
e4c4c1c6 585 dh_clean
6de5430b
RD
586 rm -f debian/$(package_wxbase_lib).*
587 rm -f debian/$(package_wxbase_dev).*
588 rm -f debian/$(package_wxbase_dbg).*
f538864d
RL
589 rm -f debian/$(package_gtk_lib).*
590 rm -f debian/$(package_gtk_dev).*
f6bcfd97 591 rm -f debian/$(package_gtk_dbg).*
fdefae19 592 rm -f debian/$(package_gtk_py_lib).*
f6bcfd97 593 rm -f debian/$(package_headers).*
3ca6a5f0 594 rm -f debian/$(package_i18n).*
f538864d 595 rm -f debian/$(package_doc).*
5c0e67b2 596 rm -f debian/$(package_examples).*
6181913e 597 rm -f debian/$(package_gtk_dbg_py).*
3a922bb4 598 rm -f debian/$(package_msw_dev).*
4fb788e4 599 rm -f debian/$(package_msw_dbg).*
ceec2216 600 rm -f debian/lintian-override
6de5430b 601 rm -f debian/unpack_examples.sh
e4c4c1c6 602
050207ec
RL
603install_arch: build_arch $(install_all_arch)
604
3a922bb4 605install: build_all $(install_all_native)
f6bcfd97 606
6de5430b
RD
607
608install-wxbase-lib: DH_OPTIONS=-p$(package_wxbase_lib)
609install-wxbase-lib: build-wxbase-shared-stamp install-gtk-shared-stamp
610 dh_testdir
611 dh_testroot
612 dh_clean -k
613 @# No, this is not a typo, we steal these libs from the gtk build.
614 dh_install $(objdir_gtk_install)/lib/libwx_base*.so.* usr/lib
615 dh_installdirs usr/share/lintian/overrides
616 cp debian/lintian-override debian/$(package_wxbase_lib)/usr/share/lintian/overrides/$(package_wxbase_lib)
617
618install-wxbase-dev: DH_OPTIONS=-p$(package_wxbase_dev)
619install-wxbase-dev: build-wxbase-shared-stamp install-gtk-shared-stamp
620 dh_testdir
621 dh_testroot
622 dh_clean -k
623 @# No, this is not a typo, we steal these libs from the gtk build.
624 dh_install $(objdir_gtk_install)/lib/libwx_base*.so usr/lib
625 dh_install $(objdir_wxbase_shared)/lib/wx/include usr/lib/wx
626 dh_install $(objdir_wxbase_shared)/lib/wx/config/base* usr/lib/wx/config
627
628install-wxbase-dbg: DH_OPTIONS=-p$(package_wxbase_dbg)
629install-wxbase-dbg: build-wxbase-debug-stamp
630 dh_testdir
631 dh_testroot
632 dh_clean -k
633 @# No, this is not a typo, we steal these libs from the gtk debug build.
634 dh_install $(objdir_gtk_debug)/lib/libwx_base* usr/lib
635 dh_install $(objdir_wxbase_debug)/lib/wx/include usr/lib/wx
636 dh_install $(objdir_wxbase_debug)/lib/wx/config/base* usr/lib/wx/config
637 dh_installdirs usr/share/lintian/overrides
638 cp debian/lintian-override debian/$(package_wxbase_dbg)/usr/share/lintian/overrides/$(package_wxbase_dbg)
639
ceec2216 640install-gtk-shared-stamp: build-gtk-shared-stamp build-gtk-shared-contrib-stamp
8ddf18dd
RL
641 dh_testdir
642 mkdir -p $(objdir_gtk_install)
643 cd $(objdir_gtk_shared) \
644 && $(MAKE) install prefix=`pwd`/../$(objdir_gtk_install)
ceec2216
RL
645 cd $(objdir_gtk_shared)/contrib/src \
646 && $(MAKE) install prefix=`pwd`/../../../$(objdir_gtk_install)
8ddf18dd
RL
647 touch $@
648
f6bcfd97 649install-gtk-lib: DH_OPTIONS=-p$(package_gtk_lib)
ceec2216 650install-gtk-lib: install-gtk-shared-stamp
f6bcfd97
BP
651 dh_testdir
652 dh_testroot
653 dh_clean -k
6de5430b
RD
654 dh_install $(objdir_gtk_install)/lib/libwx_gtk*.so.* usr/lib
655 dh_installdirs usr/share/lintian/overrides
656 cp debian/lintian-override debian/$(package_gtk_lib)/usr/share/lintian/overrides/$(package_gtk_lib)
e4c4c1c6 657
f6bcfd97 658install-gtk-dev: DH_OPTIONS=-p$(package_gtk_dev)
eedbe999 659install-gtk-dev: install-gtk-shared-stamp
f6bcfd97
BP
660 dh_testdir
661 dh_testroot
662 dh_clean -k
6de5430b 663 dh_install $(objdir_gtk_install)/lib/libwx_gtk*.so usr/lib
ceec2216
RL
664 dh_install $(objdir_gtk_install)/lib/wx/include usr/lib/wx
665 dh_install $(objdir_gtk_install)/lib/wx/config/gtk* usr/lib/wx/config
ceec2216 666
f6bcfd97 667install-gtk-dbg: DH_OPTIONS=-p$(package_gtk_dbg)
ceec2216 668install-gtk-dbg: build-gtk-debug-stamp build-gtk-debug-contrib-stamp
f6bcfd97
BP
669 dh_testdir
670 dh_testroot
671 dh_clean -k
6de5430b 672 dh_install $(objdir_gtk_debug)/lib/libwx_gtk* usr/lib
ceec2216
RL
673 dh_install $(objdir_gtk_debug)/lib/wx/include usr/lib/wx
674 dh_install $(objdir_gtk_debug)/lib/wx/config/gtk* usr/lib/wx/config
6de5430b 675 dh_installdirs usr/share/lintian/overrides
050207ec 676 cp debian/lintian-override debian/$(package_gtk_dbg)/usr/share/lintian/overrides/$(package_gtk_dbg)
e4c4c1c6 677
7b7a7637 678
fdefae19
RL
679install-gtk-py-lib: DH_OPTIONS=-p$(package_gtk_py_lib)
680install-gtk-py-lib: build-gtk-py-stamp
f6bcfd97
BP
681 dh_testdir
682 dh_testroot
683 dh_clean -k
6de5430b 684 dh_installdirs usr/lib/wx/python
e1293dcf
RL
685 cd wxPython \
686 && $(python_ver) ./setup.py install \
fdefae19 687 --prefix=`pwd`/../debian/$(package_gtk_py_lib)/usr \
b63b07a8 688 WX_CONFIG='$(wxconfig)' \
6de5430b
RD
689 SYS_WX_CONFIG='$(py_wxconfig)' \
690 WXPORT=$(pytoolkit) \
b945df00 691 $(PY_UNICODE) \
fdefae19 692 FLAVOUR=$(DEBIAN_WXFLAVOUR)
e1293dcf 693
6de5430b
RD
694 mv debian/$(package_gtk_py_lib)/$(pydir)/wx.pth \
695 debian/$(package_gtk_py_lib)/usr/lib/wx/python/wx$(release).pth
696
e653e181 697 find debian/$(package_gtk_py_lib)/$(pydir) -name '*.py?' -exec rm '{}' ';'
f6bcfd97 698
fdefae19 699 # This is rather bogus, its included in the main copyright file now though.
e653e181 700 rm -f debian/$(package_gtk_py_lib)/$(wxpydir)/wx/tools/XRCed/license.txt
fdefae19 701
6de5430b
RD
702install-gtk-py-ver: DH_OPTIONS=-p$(package_gtk_py_ver)
703install-gtk-py-ver: install-gtk-py-lib
fdefae19
RL
704 dh_testdir
705 dh_testroot
706 dh_clean -k
fdefae19 707
6de5430b
RD
708ifndef DEBIAN_WX_DEFAULT_VERSION
709
710 dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) $(pydir)/wxversion.py
711else
712 rm debian/$(package_gtk_py_lib)/$(pydir)/wxversion.py
713endif
714
715install-gtk-py-tools: DH_OPTIONS=-p$(package_gtk_py_tools)
716install-gtk-py-tools: install-gtk-py-ver
717 dh_testdir
718 dh_testroot
719 dh_clean -k
720
721ifndef DEBIAN_WX_DEFAULT_VERSION
722
723 dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) usr/bin
fdefae19 724
0ecfbbea 725 dh_installman debian/wxPython-tools.1
e1293dcf
RL
726 dh_link usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2py.1 \
727 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2xpm.1 \
728 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2png.1 \
729 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pycrust.1 \
730 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyshell.1 \
731 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/xrced.1 \
732 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/helpviewer.1 \
733 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalacarte.1 \
734 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalamode.1 \
46ec284e
RL
735 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywrap.1 \
736 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywxrc.1
e1293dcf 737
6de5430b
RD
738 dh_installdirs usr/share/lintian/overrides
739 cp debian/lintian-override debian/$(package_gtk_py_tools)/usr/share/lintian/overrides/$(package_gtk_py_tools)
740endif
741 mkdir -p debian/$(package_gtk_py_tools)/usr/share/pixmaps
742 mkdir -p debian/$(package_gtk_py_tools)/usr/share/applications
743
744 cp wxPython/wx/py/PyCrust_32.png debian/$(package_gtk_py_tools)/usr/share/pixmaps/pycrust.png
745 cp wxPython/wx/py/PyCrust_32.png debian/$(package_gtk_py_tools)/usr/share/pixmaps/pyshell.png
746 cp wxPython/wx/tools/XRCed/XRCed_32.png debian/$(package_gtk_py_tools)/usr/share/pixmaps/xrced.png
747 cp debian/pycrust.desktop debian/$(package_gtk_py_tools)/usr/share/applications
748 cp debian/pyshell.desktop debian/$(package_gtk_py_tools)/usr/share/applications
749 cp debian/xrced.desktop debian/$(package_gtk_py_tools)/usr/share/applications
750
751 rm -r debian/$(package_gtk_py_lib)/usr/bin
752
753install-gtk-py: install-gtk-py-tools
754
0ecfbbea 755
148e141b
RL
756install-common: DH_OPTIONS=-p$(package_common)
757install-common: install-gtk-shared-stamp
758 dh_testdir
759 dh_testroot
760 dh_clean -k
148e141b 761
148e141b
RL
762 dh_install $(objdir_gtk_install)/share/aclocal usr/share
763 dh_installman debian/wx-config.1
764
a13a7f89 765 dh_install $(objdir_gtk_shared)/utils/wxrc/wxrc usr/bin
148e141b
RL
766 dh_installman debian/wxrc-tools.1
767 dh_link usr/share/man/man1/wxrc-tools.1 usr/share/man/man1/wxrc.1
148e141b
RL
768
769
f6bcfd97 770install-headers: DH_OPTIONS=-p$(package_headers)
8ddf18dd 771install-headers: install-gtk-shared-stamp
f6bcfd97
BP
772 dh_testdir
773 dh_testroot
774 dh_clean -k
8155b640
RL
775
776# The only way to be really sure we get the univ headers correct is to install
777# them. Do that in a scratch dirs, and move the gtk ones last, so at least
778# they win in the result of any uncaught conflict.
779
0ecfbbea
RL
780# cd $(objdir_gtk_univ) \
781# && $(MAKE) install prefix=`pwd`/../$(objdir_univ_install)/usr
8155b640 782
0ecfbbea 783# dh_movefiles --sourcedir=$(objdir_univ_install)
8ddf18dd 784 dh_install $(objdir_gtk_install)/include usr
ceec2216 785
3ca6a5f0 786install-i18n: DH_OPTIONS=-p$(package_i18n)
8ddf18dd 787install-i18n: build-i18n-stamp install-gtk-shared-stamp
3ca6a5f0
BP
788 dh_testdir
789 dh_testroot
790 dh_clean -k
8ddf18dd 791 dh_install $(objdir_gtk_install)/share/locale usr/share
3ca6a5f0 792
f6bcfd97
BP
793install-doc: DH_OPTIONS=-p$(package_doc)
794install-doc: build-doc-stamp
795 dh_testdir
796 dh_testroot
797 dh_clean -k
6de5430b
RD
798
799 @# Link this monstrosity with an overly obfuscated name
800 @# to something that both people and browsers can expect to find.
801 dh_link usr/share/doc/$(package_doc)/wx-manual.html/wx-$(release)-manual_contents.html \
802 usr/share/doc/$(package_doc)/wx-manual.html/index.html
f6bcfd97
BP
803
804install-examples: DH_OPTIONS=-p$(package_examples)
805install-examples: build-examples-stamp
806 dh_testdir
807 dh_testroot
808 dh_clean -k
f6bcfd97 809
6181913e
RL
810install-gtk-dbg-py: DH_OPTIONS=-p$(package_gtk_dbg_py)
811install-gtk-dbg-py: build-gtk-dbg-py-stamp
812 dh_testdir
813 dh_testroot
814 dh_clean -k
6de5430b 815 dh_installdirs usr/lib/wx/python
6181913e
RL
816 cd wxPython \
817 && $(python_ver) ./setup.py install \
818 --prefix=`pwd`/../debian/$(package_gtk_dbg_py)/usr \
819 WX_CONFIG='$(wxconfig-dbg)' \
6de5430b
RD
820 SYS_WX_CONFIG='$(pyd_wxconfig)' \
821 WXPORT=$(pytoolkit) \
b945df00 822 $(PY_UNICODE) \
fdefae19 823 FLAVOUR=$(addsuffix -,$(DEBIAN_WXFLAVOUR))dbg
6181913e 824
6de5430b
RD
825 mv debian/$(package_gtk_py_lib)/$(pydir)/wx.pth \
826 debian/$(package_gtk_py_lib)/usr/lib/wx/python/wx$(release)-dbg.pth
827
e653e181
RL
828 find debian/$(package_gtk_dbg_py)/$(pydir) -name '*.py?' -exec rm '{}' ';'
829 rm -rf usr/bin $(pydir)/{wxversion.py,wx.pth}
6181913e
RL
830
831 # This is rather bogus, its included in the main copyright file now though.
e653e181 832 rm -f debian/$(package_gtk_dbg_py)/$(wxpydir)/wx/tools/XRCed/license.txt
6181913e 833
4fb788e4 834
3a922bb4 835install-msw-dev: DH_OPTIONS=-p$(package_msw_dev)
978f1259 836install-msw-dev: build-msw-shared-stamp build-msw-static-stamp
3a922bb4
RL
837 dh_testdir
838 dh_testroot
839 dh_clean -k
ceec2216
RL
840 dh_install $(objdir_msw_shared)/lib/*.dll* usr/$(cross_host)/lib
841 dh_install $(objdir_msw_shared)/lib/wx/include usr/$(cross_host)/lib/wx
9103d280 842 dh_install $(objdir_msw_shared)/lib/wx/config/$(cross_host)* usr/$(cross_host)/lib/wx/config
ceec2216
RL
843 dh_install $(objdir_msw_static)/lib/*.a usr/$(cross_host)/lib
844 dh_install $(objdir_msw_static)/lib/wx/include usr/$(cross_host)/lib/wx
9103d280 845 dh_install $(objdir_msw_static)/lib/wx/config/$(cross_host)* usr/$(cross_host)/lib/wx/config
3a922bb4
RL
846 $(cross_host)-strip --strip-debug debian/$(package_msw_dev)/usr/$(cross_host)/lib/*.a
847
9103d280
RL
848 @# As a special case for the cross packages, we link their config
849 @# under /usr as well as under the normal cross prefix. This way
850 @# --prefix=/usr/$(cross_host) and --prefix=/usr --host=$(cross_host)
851 @# will have a congruent effect on wx-config.
852 @( for f in `ls -1 debian/$(package_msw_dev)/usr/$(cross_host)/lib/wx/config`; do \
853 all_cfg="$${all_cfg} usr/$(cross_host)/lib/wx/config/$$f usr/lib/wx/config/$$f"; \
854 echo "linking cross config /usr/$(cross_host)/lib/wx/config/$$f"; \
855 done; \
856 dh_link $${all_cfg}; \
857 )
858
4fb788e4
RL
859install-msw-dbg: DH_OPTIONS=-p$(package_msw_dbg)
860install-msw-dbg: build-msw-dbg-stamp
861 dh_testdir
862 dh_testroot
863 dh_clean -k
ceec2216
RL
864 dh_install $(objdir_msw_dbg)/lib/*.dll* usr/$(cross_host)/lib
865 dh_install $(objdir_msw_dbg)/lib/wx/include usr/$(cross_host)/lib/wx
9103d280 866 dh_install $(objdir_msw_dbg)/lib/wx/config/$(cross_host)* usr/$(cross_host)/lib/wx/config
978f1259
RL
867 # No static lib, they're freakin' huge!
868 #$(cross_host)-strip --strip-debug debian/$(package_msw_dbg)/usr/$(cross_host)/lib/*.a
4fb788e4 869
9103d280
RL
870 @( for f in `ls -1 debian/$(package_msw_dbg)/usr/$(cross_host)/lib/wx/config`; do \
871 all_cfg="$${all_cfg} usr/$(cross_host)/lib/wx/config/$$f usr/lib/wx/config/$$f"; \
872 echo "linking cross config /usr/$(cross_host)/lib/wx/config/$$f"; \
873 done; \
874 dh_link $${all_cfg}; \
875 )
876
3a922bb4
RL
877install-headers-msw: DH_OPTIONS=-p$(package_headers_msw)
878install-headers-msw:
879 dh_testdir
880 dh_testroot
881 dh_clean -k
ceec2216 882
148e141b
RL
883 cd $(objdir_msw_shared) \
884 && $(MAKE) install prefix=`pwd`/../$(objdir_msw_install)
ceec2216 885
148e141b
RL
886# Symlink all the headers that will be installed by the main -headers
887# package to where the cross compiler will expect them.
888 @( for f in `ls -1 $(objdir_msw_install)/include/wx-$(release)/wx`; do \
9103d280 889 all_h="$${all_h} usr/include/wx-$(release)/wx/$$f usr/$(cross_host)/include/wx-$(release)/wx/$$f"; \
ceec2216
RL
890 echo "linking header /usr/include/wx-$(release)/wx/$$f"; \
891 done; \
892 dh_link $${all_h}; \
893 )
894
148e141b 895# But install this lot for real.
ceec2216 896 rm -f debian/$(package_headers_msw)/usr/$(cross_host)/include/wx-$(release)/wx/msw
148e141b 897 dh_install $(objdir_msw_install)/include/wx-$(release)/wx/msw usr/$(cross_host)/include/wx-$(release)/wx
3a922bb4
RL
898
899
f6bcfd97 900binary-common:
f6bcfd97
BP
901 dh_testdir
902 dh_testroot
903 dh_installdocs
5c0e67b2
RL
904 dh_installchangelogs
905 dh_installexamples
8155b640 906 dh_installmenu
5c0e67b2 907 dh_link
3a922bb4
RL
908
909 @# Don't strip debug libs at all, and strip cross libs elsewhere
910 @# with the cross host tools until dh_strip gets smarter.
6de5430b
RD
911 dh_strip -N$(package_gtk_dbg) -N$(package_wxbase_dbg) \
912 -N$(package_msw_dev) -N$(package_msw_dbg)
3a922bb4 913
e4c4c1c6
RL
914 dh_compress
915 dh_fixperms
6181913e
RL
916
917 @# Don't do this for the dbg-py special build because dh_makeshlibs
918 @# will crap out if it is called with no packages to act on.
919 @if [ "x$(DH_OPTIONS)" != "-p$(package_gtk_dbg_py)" ]; then \
6de5430b
RD
920 echo "dh_makeshlibs -N$(package_gtk_py_lib) -V"; \
921 dh_makeshlibs -N$(package_gtk_py_lib) -V; \
6181913e
RL
922 fi
923
e4c4c1c6 924 dh_installdeb
ceec2216 925 dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_dbg)/usr/lib
e4c4c1c6
RL
926 dh_gencontrol
927 dh_md5sums
928 dh_builddeb
929
f6bcfd97 930# Build architecture-independent files here.
050207ec
RL
931# Note that you currently can't build the indep packages without first
932# building the arch specific package files needed to create them.
3abb92ce 933binary-indep: build_all install
3a922bb4 934 $(MAKE) -f debian/rules \
6de5430b 935 DH_OPTIONS="-i $(addprefix -N,$(extra_packages))" \
a0b03701 936 binary-common
f6bcfd97 937
050207ec
RL
938# Build just the architecture-dependent files here.
939binary-arch: build_arch install_arch
3a922bb4 940 $(MAKE) -f debian/rules \
6de5430b 941 DH_OPTIONS="-a $(addprefix -N,$(extra_packages))" \
a0b03701 942 binary-common
f6bcfd97
BP
943
944# Build all packages target.
945binary: binary-arch binary-indep
946
6de5430b 947
3a922bb4
RL
948# This is a special target for building the wxMSW-cross packages.
949# It's not currently called during the official package build run
950# but may be run separately to build the extra packages.
951# There is an implied build dep on the mingw32 cross compiler
952# that is not in the control file.
953binary-cross: control-files-stamp $(install_all_cross)
954 $(MAKE) -f debian/rules \
e1293dcf 955 DH_OPTIONS="-p$(package_msw_dev) -p$(package_msw_dbg) -p$(package_headers_msw)" \
a0b03701 956 binary-common
3a922bb4 957
f6bcfd97 958
6181913e
RL
959# Build wxPython against libwxgtk-dbg. This package will conflict
960# with the release build one, but may be useful to some people.
961binary-dbg-py: control-files-stamp install-gtk-dbg-py
962 $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg_py)" binary-common
963
964
f6bcfd97
BP
965############################################################################
966#
967# Some rules to build a subset of the complete list of packages that can be
968# built from CVS. Beware that packages produced with these rules may *NOT*
969# be compatible with packages built using the 'binary' target or even with
970# Debian policy. Do not distribute packages built with these rules, they
971# are currently useful for rapid in-house testing by developers only.
972
973# libwxgtk shared lib package
974binary-gtk: control-files-stamp install-gtk-lib install-headers
975 $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_lib) -p$(package_headers)" binary-common
976
977binary-gtk-dev: control-files-stamp install-gtk-dev install-headers
978 $(MAKE) -f debian/rules \
979 DH_OPTIONS="-p$(package_gtk_lib) -p$(package_gtk_dev) -p$(package_headers)" \
980 binary-common
981
982binary-gtk-dbg: control-files-stamp install-gtk-dbg install-headers
983 $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg) -p$(package_headers)" binary-common
984
7b7a7637 985
f6bcfd97
BP
986# docs package
987binary-doc: control-files-stamp install-doc
988 $(MAKE) -f debian/rules DH_OPTIONS=-p$(package_doc) binary-common
989
76314141
RL
990binary-fast:control-files-stamp install-gtk-dbg install-msw-dev install-headers install-headers-msw
991 $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg) -p$(package_msw_dev) -p$(package_headers) -p$(package_headers_msw)" binary-common
992
f6bcfd97 993
6181913e
RL
994.PHONY: build build_all build_arch \
995 clean clean-py purge-release-py purge-dbg-py \
996 binary-indep binary-arch binary binary-common \
6de5430b
RD
997 binary-gtk binary-gtk-dev binary-gtk-dbg \
998 binary-wxbase binary-wxbase-dev binary-wxbase-dbg \
999 binary-doc binary-cross binary-dbg-py \
6181913e 1000 install install_arch install-gtk-lib install-gtk-dev \
ceec2216 1001 install-gtk-dbg \
6de5430b
RD
1002 install-gtk-py install-gtk-py-tools install-gtk-py-ver \
1003 install-gtk-py-lib install-gtk-dbg-py \
148e141b
RL
1004 install-common install-headers install-i18n install-doc \
1005 install-examples install-msw-dev install-msw-dbg install-headers-msw
f6bcfd97 1006