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

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_OPTIONS
export GZIP=-9 -n

%:
	dh $@ --with quilt

override_dh_auto_clean:
	dh_auto_clean
	rm -f configure config.sub config.guess

override_dh_auto_configure:
	ln -sf /usr/share/misc/config.sub .
	ln -sf /usr/share/misc/config.guess .
	autoconf -I /usr/share/gauche/0.9
	dh_auto_configure

# Not invoking make install at 'doc' directory
override_dh_auto_install:
	(cd src; $(MAKE) DESTDIR=$(CURDIR)/debian/gauche-gl install)
	(cd lib; $(MAKE) DESTDIR=$(CURDIR)/debian/gauche-gl install)
	gauche-install -m 444 -T $(CURDIR)/debian/gauche-gl`gauche-config --syslibdir`/.packages Gauche-gl.gpd
