#!/usr/bin/make -f

include /usr/share/octave/debian/defs.make

%:
	dh $@ --with elpa

# Disable multi-arch path
override_dh_auto_configure:
	dh_auto_configure -- --libdir=/usr/lib

# Also build PDF and HTML docs (unless nodoc is given)
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
override_dh_auto_build:
	dh_auto_build -- all pdf html
else
override_dh_auto_build:
	dh_auto_build
endif

# Don't run the testsuite
override_dh_auto_test:

override_dh_link:
	dh_link --package=dynare /usr/lib/dynare/matlab/dynare.m $(MDIR)/dynare.m

# Generate a versioned dependency on octave.
# This is to avoid the situation where the dependency on liboctaveNN is
# satisfied, but does not correspond to the version of octave installed.
override_dh_gencontrol:
	dh_octave_substvar
	dh_gencontrol
