#!/usr/bin/make -f
# DH_VERBOSE := 1
export LC_ALL=C.UTF-8
export DEB_BUILD_MAINT_OPTIONS=hardening=+all optimize=-lto

# Fix a shift against reference data on i386 causing autopkgtest regressions.
ifneq (,$(filter $(DEB_HOST_ARCH),i386))
export DEB_CXXFLAGS_MAINT_APPEND = -ffloat-store
endif

%:
	dh $@

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test --no-parallel
endif

EXAMPLES = $(CURDIR)/debian/ivar/usr/share/doc/ivar/examples/data
execute_before_dh_fixperms:
	if [ -x $(EXAMPLES)/data/primer_pair_test/test_primer_pair.bed ] \
	; then chmod -v -x $(EXAMPLES)/primer_pair_test/test_primer_pair.bed \
	; fi
