#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --with autoreconf

# We're going to do something ultra funky now.
# Try to configure the package twice, in different build
# directories, once with and once without GSI mode.

override_dh_auto_configure:
	dh_auto_configure -Bbuild-gsi -- $(shell dpkg-buildflags --export=configure)
	dh_auto_configure -Bbuild-nogsi -- --disable-gsi-mode $(shell dpkg-buildflags --export=configure)

override_dh_auto_build:
	dh_auto_build -Bbuild-gsi
	dh_auto_build -Bbuild-nogsi

# It's ok to share the same destdir between the builds; overlapping
# files are identical.
override_dh_auto_install:
	dh_auto_install -Bbuild-gsi --destdir=debian/tmp
	dh_auto_install -Bbuild-nogsi --destdir=debian/tmp

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog
