#!/usr/bin/make -f

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

# Standard way of building Haskell libraries .
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/hlibrary.mk

clean ::
	make -C doc clean

doc/users_guide:
	make -C doc

build/$(CABAL_PACKAGE) :: build-ghc-stamp doc/users_guide

install/$(CABAL_PACKAGE) :: build/$(CABAL_PACKAGE)
	$(DEB_SETUP_BIN_NAME) copy --builddir=dist-ghc --destdir=debian/$(CABAL_PACKAGE)
	rm -rf debian/$(CABAL_PACKAGE)/usr/share/doc
