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

include /usr/share/ocaml/ocamlvars.mk

DESTDIR=$(CURDIR)/debian/tmp

%:
	dh $@ --with ocaml --no-parallel

override_dh_auto_configure:
	$(MAKE) -f Makefile.bootstrap
	dh_auto_configure -- --libdir=$(OCAML_STDLIB_DIR)

override_dh_auto_install:
	dh_auto_install
	chmod a-x $(DESTDIR)$(OCAML_STDLIB_DIR)/stdcompat/*
	rm -f $(DESTDIR)$(OCAML_DLL_DIR)/*.owner

override_dh_auto_test:
ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
	dh_auto_test
endif
