#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

ifeq ($(shell dpkg-query -s doxygen graphviz 1>/dev/null 2>&1 && echo yes),yes)
EXTRA_OPTS = --docs
endif

WAFOPTS = --prefix=/usr \
	--destdir=$(CURDIR)/debian/tmp \
	--debug \
	--strict \
	--verbose \
	--htmldir=/usr/share/doc/libraul-doc/html \
	$(EXTRA_OPTS)

%:
	dh $@

override_dh_auto_configure:
	./waf configure $(WAFOPTS)

override_dh_auto_build:
	./waf build $(WAFOPTS)

override_dh_auto_install:
	./waf install $(WAFOPTS)
	rm -f $(CURDIR)/debian/tmp/usr/share/doc/libraul-doc/html/jquery.js

override_dh_auto_clean:
	./waf clean || true
	find -name "*.pyc" -delete
	dh_auto_clean
