#!/usr/bin/make -f
export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DOPACKAGES = $(shell dh_listpackages)

override_dh_auto_configure:
	dh_auto_configure -- --$(if $(filter liblognorm-doc,$(DOPACKAGES)),en,dis)able-docs --enable-compile-warnings=yes

execute_before_dh_auto_build:
	mkdir -p doc/_static

override_dh_compress:
	dh_compress -X.txt

override_dh_auto_test-arch:
	# must be executed consecutively lest they interfere with each other!
	dh_auto_test --no-parallel
# unbreak arch-indep only builds
override_dh_auto_test-indep:

%:
	dh $@ --with=autoreconf $(DH_ADDONS)
build binary %-indep: DH_ADDONS=--with=sphinxdoc
