#!/usr/bin/make -f

include /usr/share/ocaml/ocamlvars.mk

DESTDIR = $(CURDIR)/debian/tmp$(OCAML_STDLIB_DIR)

%:
	dh $@ --with ocaml

override_dh_autoreconf:
	./bootstrap

override_dh_auto_build:
	dh_auto_build
	$(MAKE) doc

override_dh_auto_install:
	mkdir -p $(DESTDIR) $(CURDIR)/debian/tmp$(OCAML_DLL_DIR)
	$(MAKE) install OCAMLFIND_DESTDIR=$(DESTDIR) OCAMLFIND_LDCONF=ignore
	rm -f $(CURDIR)/debian/tmp$(OCAML_DLL_DIR)/*.owner
