#!/usr/bin/make -f

%:
	dh $@ --with ocaml

export NO_CUSTOM = yes

ifneq ($(wildcard /usr/bin/ocamlopt),)
override_dh_auto_build:
	$(MAKE) reallyall
endif

export OCAMLFIND_DESTDIR = debian/tmp/$(shell /usr/bin/ocamlc -where)
export OCAMLFIND_LDCONF = ignore

override_dh_auto_install:
	mkdir -p $(OCAMLFIND_DESTDIR)
	$(MAKE) install
