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

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/default.mk

%:
	dh $@

override_dh_auto_install:
	$(MAKE) DESTDIR=$(CURDIR)/debian/$(DEB_SOURCE) install

override_dh_auto_clean:
	rm -rf autom4te.cache blib Build
	dh_auto_clean
	if [ -f Makefile ] ; then make distclean ; fi
	if [ -f Makefile.in.bak ] ; then mv Makefile.in.bak Makefile.in ; fi
	if [ -f configure.bak ] ; then mv configure.bak configure ; fi

override_dh_auto_configure:
	cp -a Makefile.in Makefile.in.bak
	cp -a configure configure.bak
	dh_auto_configure
