+ifdef CONCURRENCY_LEVEL
+ # A user who knows what they want, that's like gold...
+ # respect their precious opinion of how much blue smoke to use.
+ JOB_COUNT := $(CONCURRENCY_LEVEL)
+else ifdef DISTCC_HOSTS
+ # Otherwise, if they have a cluster, try to put it to good use.
+ JOB_COUNT := $(shell set $${DISTCC_HOSTS} > /dev/null 2>&1 ; echo $$\#)
+endif
+
+ifdef JOB_COUNT
+ FAST_MAKE = $(MAKE) -j $(JOB_COUNT)
+else
+ FAST_MAKE = $(MAKE)
+endif
+
+
+# Find the python version(s) to build for
+PYVERS := $(shell pyversions -vr || pyversions -vs)
+ifeq ($(strip $(PYVERS)),)
+ PYVERS := $(shell python -c 'import sys; print sys.version[:3]')
+ NO_PYCENTRAL = 1
+ PY_BUILD_DEPS = python$(PYVERS), python$(PYVERS)-dbg, python$(PYVERS)-dev
+else
+ DEB_PYTHON_SYSTEM=pycentral
+ PY_BUILD_DEPS = python-all, python-all-dbg, python-all-dev, python-central
+endif
+
+# If another source package is to supply the common binary packages
+# for a particular Debian release, then define this variable to indicate
+# the $(release) that is expected to provide it. Do not define it at
+# all if this is to be the default (or only) wx source package for the
+# target release.
+#
+#DEBIAN_WX_DEFAULT_VERSION = 2.8
+
+
+# This will extract a flavour out of the name of the source directory
+# and flavour the packages and binaries with it. 'Official' builds
+# should use a source dir of the form wxwidgets$RELEASE-$VERSION.
+# Flavoured builds may use wxwidgets$RELEASE-$FLAVOUR-$VERSION, where
+# any descriptive alphanumeric name will do for FLAVOUR. This will
+# allow a custom build to be installed alongside the mainline ones
+# without conflict. You will also need to make a corresponding
+# changelog entry for your flavour source package using:
+# wxwidget$RELEASE-$FLAVOUR ($VERSION) to satify dpkg-source and
+# to correctly set the release below.
+DEBIAN_WXFLAVOUR := $(shell pwd | sed -e 's@.*/wxwidgets[0-9.]\+-\?\(.*\)-[0-9.]\+-\?.*@\1@')
+
+
+wx_major_version_number := $(shell sed -n 's/^wx_major_version_number=//p' configure.in)
+wx_minor_version_number := $(shell sed -n 's/^wx_minor_version_number=//p' configure.in)
+wx_release_number := $(shell sed -n 's/^wx_release_number=//p' configure.in)
+wx_subrelease_number := $(shell sed -n 's/^wx_subrelease_number=//p' configure.in)
+
+##release := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p' | sed 's/-ansi//')
+release := $(wx_major_version_number).$(wx_minor_version_number)
+
+# This is broken completely now by bakefiles changes. Until we add
+# some hocus pocus to the main tree, to export these values from it
+# again, we approximate its behaviour (fairly precisely fwiw) to
+# specify $soversion below. Re-automate if incompatible changes
+# result in it actually changing.
+#soversion := $(shell grep '^WX_CURRENT=' configure.in | sed 's/WX_CURRENT=\([0-9]\+\).*/\1/')
+soversion := 0
+sorelease := $(release:%-$(DEBIAN_WXFLAVOUR)=%)-$(soversion)$(addprefix -,$(DEBIAN_WXFLAVOUR))
+
+# In some places we use the full version number, including the micro version,
+# for the development releases (which can be incompatible for the same major
+# and minor version) but just the major.minor for the stable releases (which
+# are supposed to be compatible), this variable contains the appropriate value
+ifeq ($(shell echo `echo $(release) | sed 's/.\+\.\(.\+\)/\1/'`%2 | bc),1)
+ # development release
+ compatible_release := $(release).$(wx_release_number)
+else
+ compatible_release := $(release)
+endif
+
+# Base value for alternative priorities.
+alt_prio := $(subst .,,$(release))
+
+cross_host := i586-mingw32msvc
+cross_build := $(shell ./config.guess)