#!/usr/bin/make -f

%:
	dh $@ --no-parallel

export AUTOHEADER = true
execute_after_dh_autoreconf:
	mv autoconf/configure .

override_dh_auto_install:
	dh_auto_install -- prefix=/usr INSTALL="install -m 644"

# The presence of the top-level Makefile in the upstream tarball
# yields failure in the autobuilders. The code below prevents the
# execution of "make clean" the "dh clean" command when src/Makefile is
# absent. A request has been sent upstream:
# https://lists.jedsoft.org/lists/slang-devel/2021/0000020.html
execute_before_dh_auto_clean:
	[ -f src/Makefile ] || rm -f Makefile
