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

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

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

export CC
export FORCE_SOURCE_DATE=1

CONFIGURE_FLASE = --with-pager=/usr/bin/pager --with-fhs-rcfiles \
		--prefix=/usr --mandir=\$${prefix}/share/man

%:
	dh $@

override_dh_auto_configure:
	CFLAGS="$(CFLAGS)" dh_auto_configure -- $(CONFIGURE_FLAGS)

override_dh_auto_build:
	dh_auto_build
	make -C ./doc bibclean.dvi



#### original version
#XXX build-stamp: config.status
#XXX 	$(MAKE)
#XXX 	$(MAKE) -C ./doc bibclean.dvi
#XXX 	touch build-stamp
#XXX
#XXX install: build
#XXX 	mv debian/bibclean/usr/share/bibcleanrc debian/bibclean/etc/
#XXX 	rm debian/bibclean/usr/bin/bibclean-*
#XXX
#XXX configure:
#XXX 	dh_testdir
#XXX 	autoconf2.13
#XXX
#XXX # Special magic to reproduce the same layout as the bibclean.h
#XXX # distributed by upstream:
#XXX bibclean.h:
#XXX 	dh_testdir
#XXX 	make -f Makefile.in AWK=awk NROFF='nroff -rLL=74n' SED=sed bibclean.h
#XXX 	perl -pi -e's/"  /"/' bibclean.h
