#!/usr/bin/make -f

# do we have compilation of ocaml to native code?
OPT = $(shell test -x /usr/bin/ocamlopt && echo true)

%:
	dh $@ --with ocaml

override_dh_install:
	dh_install
ifeq ($(OPT),true)
	dh_install */*.cmxa /usr/lib/ocaml/dose2
endif

override_dh_auto_build:
	dh_auto_build
	mkdir -p debian/html
	-ocamldoc -html -d debian/html */*.mli

override_dh_auto_clean:
	dh_auto_clean
	-rm -r debian/html