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

include /usr/share/ocaml/ocamlvars.mk

%:
	dh $@ --with ocaml

override_dh_auto_build:
	dune build -p belenios-platform,belenios-platform-native,belenios-lib,belenios-tool
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
	$(MAKE) doc
endif
	_build/default/src/tool/cmdline/tool_cmdline.exe --help=groff > debian/belenios-tool.1

override_dh_auto_install:
	dune install --destdir=debian/tmp --prefix=/usr belenios-tool
