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