#!/usr/bin/make -f

include /usr/share/ocaml/ocamlvars.mk

DESTDIR=$(CURDIR)/debian/ocaml-obuild

%:
	dh $@ --with ocaml

override_dh_auto_build:
	./bootstrap

override_dh_auto_install:
# Check that installed files have not changed. If so, the Debian
# packaging must be adapted by hand. This way, we avoid a dependency
# on opam-installer.
	diff -u debian/ocaml-obuild.opam-install obuild.install

override_dh_install:
	mkdir -p "$(DESTDIR)/usr/bin"
	cp "dist/build/obuild/obuild" "dist/build/obuild-simple/obuild-simple" "$(DESTDIR)/usr/bin"
