#!/usr/bin/make -f

# export DH_VERBOSE=1

# Workaround for fortification.
# See https://wiki.debian.org/Hardening
# Remove when no longer necessary.
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS+=$(CPPFLAGS)
CXXFLAGS+=$(CPPFLAGS)

%:
	dh $@ --parallel

override_dh_auto_build:
	dh_auto_build
	@echo building PDF reference manual
	cd obj-*/doc/latex && \
	 sed --in-place 's:usepackage\[utf8\]{inputenc}:usepackage[utf8x]{inputenc}:' refman.tex && \
	 $(MAKE) pdf

override_dh_auto_test:
	@echo do not ask do not tell do not test

override_dh_install:
	dh_install --list-missing

override_dh_compress:
	dh_compress -Xrefman.pdf -Xdoc/html/
