#! /usr/bin/make -f
BUILDDIR = $(CURDIR)/debian/build

%:
	dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR) --parallel

override_dh_auto_configure:
	dh_auto_configure -- -DDART_TESTING_TIMEOUT=300

override_dh_installchangelogs:
	dh_installchangelogs debian/Changelog_upstream

override_dh_auto_test:
	echo -- Running tests. Even if one of them fails the build is not canceled.
	-cat /proc/meminfo
	-cat /proc/cpuinfo
	cd $(BUILDDIR); $(MAKE) buildtests
	dh_auto_test -- ARGS=-VV || true

binary-indep: 
	dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR) --before dh_auto_build
	cd $(BUILDDIR); $(MAKE) doc
	rm -f $(BUILDDIR)/doc/html/unsupported/installdox
	dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR) --after dh_auto_build

binary-arch: 
	dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR)

binary: binary-indep
