#!/usr/bin/make -f

%:
	dh $@ --with elpa,sphinxdoc

override_dh_installchangelogs:
	cat CHANGES.rst CHANGES.old > debian/.debhelper/changelog
	dh_installchangelogs debian/.debhelper/changelog

override_dh_auto_build:
	( cd doc && make OFFLINE=yes html )

# Temporary workaround for
# https://github.com/jorgenschaefer/emacs-buttercup/issues/230
override_dh_auto_test:
	buttercup --eval '(setq comp-enable-subr-trampolines nil)' -L .

# The file flycheck.html in the _downloads subdir is generated from
# the old texinfo manual, which is deprecated by upstream.  Don't
# install it as parts could be out-of-date
override_dh_installdocs:
	dh_installdocs --link-doc=elpa-flycheck --exclude=_downloads/flycheck.html
