#!/usr/bin/make -f


# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

VERFILE:=$(shell pwd)/debian/udunits2.ver

# magic debhelper rule
%:
	dh $@  

override_dh_auto_clean:
	dh_auto_clean
	rm -f stamp-vti version.texi udunits2.info

override_dh_auto_configure:
	LDFLAGS=" -Wl,--as-needed -Wl,--version-script,${VERFILE} $(LDFLAGS)" \
			dh_auto_configure -- --datarootdir=/usr/share/xml


override_dh_auto_build:
	dh_auto_build
	$(MAKE) pdf html

override_dh_auto_install:
	dh_auto_install
	dh_installchangelogs CHANGE_LOG
	rm -f debian/tmp/usr/lib/*/*.la debian/tmp/usr/share/xml/doc/udunits/CHANGE_LOG
