#!/usr/bin/make -f

include /usr/share/ocaml/ocamlvars.mk

export OCAMLFIND_DESTDIR=debian/tmp$(OCAML_STDLIB_DIR)
export OCAMLFIND_LDCONF=ignore

%:
	dh $@ --with ocaml

.PHONY: override_dh_install
override_dh_install:
	dh_install --fail-missing -X.so.owner

.PHONY: override_dh_auto_install
override_dh_auto_install:
	mkdir -p debian/tmp$(OCAML_STDLIB_DIR) debian/tmp$(OCAML_DLL_DIR)
	dh_auto_install

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
	touch Makefile.config
	dh_auto_clean
	rm -f Makefile.config

.PHONY: override_dh_auto_configure
override_dh_auto_configure:
	touch Makefile.config
	dh_auto_configure
