#!/usr/bin/make -f

export PYBUILD_NAME=gmpy2

# Fix the build date for Sphinx manpages so we get reproducible builds.
LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")

%:
	dh $@ --buildsystem pybuild --parallel --with python2,python3,sphinxdoc

override_dh_auto_build:
	dh_auto_build
	make man -C $(CURDIR)/docs SPHINXOPTS="-D today=\"$(BUILD_DATE)\""
