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