#!/usr/bin/make -f

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

%:
	dh $@

TOOLSSRC = $(CURDIR)/src
TOOLSDES = $(CURDIR)/debian/stardict-tools/usr/lib/stardict-tools

override_dh_auto_configure:
	autoreconf -f -i
	dh_auto_configure

override_dh_auto_install:
	dh_auto_install

	# Put noinst_PROGRAMS in /usr/lib/stardict-tools
	install -d $(TOOLSDES)
	for FILE in `grep noinst_PROGRAMS src/Makefile.am \
			| sed -e 's/noinst_PROGRAMS = //'`; do \
		install $(TOOLSSRC)/$$FILE $(TOOLSDES); \
	done
