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

include /usr/share/coq/coqvars.mk
include /usr/share/ocaml/ocamlvars.mk

# Show full commands when building.
export VERBOSE := 1

TARGET := byte
ifeq ($(OCAML_NATDYNLINK),yes)
  TARGET += opt
else
  export OPT := -byte
endif

%:
	dh $@ --with ocaml

override_dh_auto_clean:
	$(MAKE) clean

override_dh_auto_build:
	$(MAKE) Makefile.coq
	$(MAKE) -f Makefile.coq $(TARGET) html

override_dh_auto_install:
	$(MAKE) -f Makefile.coq install install-byte DSTROOT=$(CURDIR)/debian/tmp

override_dh_missing:
	dh_missing --fail-missing

override_dh_gencontrol:
	dh_gencontrol -- -VF:CoqABI="$(COQ_ABI)"
