#!/usr/bin/make -f

export PYBUILD_AFTER_CLEAN=rm -rf pydocumentdb.egg-info doc/_build doc/api

%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
	sphinx-apidoc -f -e -o doc/api pydocumentdb
	$(MAKE) -C doc man
endif
endif
