#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=meson --with sphinxdoc

override_dh_auto_configure:
	dh_auto_configure --buildsystem=meson -- -Dbuild_tests=true

override_dh_missing-indep:
	dh_missing --list-missing

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	python3 -m sphinx -b html docs/source \
		$(CURDIR)/debian/libcglm-doc/usr/share/doc/libcglm-doc/html
	rm -f $(CURDIR)/debian/libcglm-doc/usr/share/doc/libcglm-doc/html/.nojekyll
	dh_sphinxdoc
endif
