#!/usr/bin/make -f

DEB_BUILD_MAINT_OPTIONS := hardening=+all
DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
include /usr/share/dpkg/buildflags.mk

%:
	dh $@

# Suggested upstream as contents for ./bootstrap.
.PHONY: override_dh_autoreconf
override_dh_autoreconf:
	dh_autoreconf -- sh -ec "autoreconf -fi;intltoolize -f --automake"

# Make data flow of build flags visible in the log.
.PHONY: override_dh_auto_configure
override_dh_auto_configure:
	dh_auto_configure -- $(foreach v,CFLAGS CPPFLAGS LDFLAGS,'$(v)=$($(v))')

# Skip installing COPYING (redundant with Debian copyright file) and
# install ChangeLog under a different name..
.PHONY: override_dh_auto_install
override_dh_auto_install:
	dh_auto_install -- lingotdoc_DATA='README AUTHORS NEWS THANKS'
.PHONY: override_dh_installchangelogs
override_dh_installchangelogs:
	dh_installchangelogs ChangeLog
