#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS

%:
	dh $@  --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --program-prefix='dateutils.'

override_dh_auto_test:
	LC_ALL=C dh_auto_test

override_dh_auto_clean:
	[ -f Makefile ] && dh_auto_clean || true
	rm -f info/dadd.manu info/dconv.man info/ddiff.mand info/dgrep.man \
	info/dround.manu info/dseq.manu info/dtest.man info/strptime.man \
	info/dzone.man info/dsort.man info/dadd.h2m info/dadd.texi \
	info/dconv.h2m info/dconv.texi info/ddiff.h2m info/ddiff.texi \
	info/dgrep.h2m info/dgrep.texi info/dround.h2m info/dround.texi \
	info/dseq.h2m info/dseq.texi info/dsort.h2m info/dsort.texi \
	info/dtest.h2m info/dtest.texi info/dzone.h2m info/dzone.texi \
	info/format-ddiff.th2m info/format.th2m info/strptime.h2m \
	info/strptime.texi info/units.th2m \
	src/*.yucc test/*.yucc lib/*.yucc \
	lib/fmt-special.c \
	lib/version.c \
	lib/leapseconds.def \
	.version \
	info/dateutils.info \
	src/dexpr-parser.[ch] src/dexpr-scanner.c src/strpdt-special.c \
