#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_BUILD_OPTIONS = parallel=$(shell nproc)

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --enable-editing \
	 $(if $(filter nodoc,$(DEB_BUILD_PROFILES)),,--enable-doxygen-pdf --enable-doxygen-man --enable-doxygen-html)

override_dh_auto_build-arch:
	dh_auto_build

override_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
	dh_auto_build -- docs
endif

override_dh_compress:
	dh_compress --exclude=.pdf
