#!/usr/bin/make -f

export NATURALDOCS=/usr/bin/naturaldocs

%:
	dh $@ --parallel --with autoreconf

override_dh_auto_clean:
	rm -rf m4
	dh_auto_clean

override_dh_autoreconf:
	mkdir m4
	dh_autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --enable-static=no

override_dh_auto_build:
	dh_auto_build
ifeq ($(shell dpkg-query -s naturaldocs 1>/dev/null 2>&1 && echo yes),yes)
	cd doc/ && $(MAKE) html
endif
