#!/usr/bin/make -f
# Copyright  2002,2003 Colin Walters <walters@verbum.org>
# Copyright  2003 Daniel Stone <daniels@debian.org>
# Copyright  2006 Sjoerd Simons <sjoerd@debian.org>
# Copyright  2006 Nokia Corporation. All rights reserved.

include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

DEB_TAR_SRCDIR := dbus-glib-0.74
include /usr/share/cdbs/1/rules/tarball.mk

# Use soft-float and thumb mode if it is enabled.
ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -mthumb
endif

# Strict library versioning
DEB_DH_MAKESHLIBS_ARGS_ALL := -V

DEB_DH_STRIP_ARGS := --dbg-package=libdbus-glib-1-2

# this is needed because we patch Makefile.ams in the tarball
makebuilddir/libdbus-glib-1-2::
	cd $(DEB_BUILDDIR); AUTOMAKE=automake-1.9 ACLOCAL=aclocal-1.9 autoreconf

common-configure-impl::
	cp $(CURDIR)/debian/dbus-bus-introspect.xml $(DEB_BUILDDIR)/tools/

doxygen-stamp:
	cd $(DEB_BUILDDIR); doxygen Doxyfile
	touch doxygen-stamp

build/libdbus-glib-1-doc:: doxygen-stamp

clean::
	rm -f doxygen-stamp
	rm -rf $(DEB_BUILDDIR)/doc/api
	rm -f *.cdbs-config_list
