#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

DEB_HOST_MULTIARCH ?= $(dpkg-architecture -qDEB_HOST_MULTIARCH)
CFLAGS += -g -gdwarf-2 -fno-omit-frame-pointer
ifeq ($(DEB_HOST_ARCH),solaris-i386)
CFLAGS += -msave-args
CXXFLAGS += -msave-args
endif

%:
	dh $@

package = diffutils

override_dh_auto_clean:
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -rf doc/$(package)

override_dh_auto_configure:
	dh_auto_configure -- --disable-silent-rules

override_dh_installdocs-indep:
	cd doc && makeinfo --html --split=chapter $(package).texi
	dh_installdocs -i doc/$(package)/*.html

override_dh_installdocs-arch:
	dh_installdocs -a NEWS

override_dh_strip:
	dh_strip --ctfconvert-flags="-i"
