#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND=-latomic

%:
	dh ${@} -Xjquery.js -Xunderscore.js -X.la

override_dh_auto_build-indep:
	cd doc && sphinx-build -b html . _build/html
	cd doc && sphinx-build -b man . _build/man

	dh_sphinxdoc

execute_after_dh_installdocs-indep:
	mv debian/vapoursynth-doc/usr/share/doc/vapoursynth/* \
	debian/vapoursynth-doc/usr/share/doc/vapoursynth-doc/

override_dh_auto_clean:
	[ ! -f Makefile ] || $(MAKE) distclean

override_dh_clean:
	${RM} -rf doc/_build/html
	${RM} -rf doc/_build/man/.doctrees

	dh_clean
