# In order to generated colourised HTML for the libghc-hscolour-doc package
# we need a special hack because the colour docs are generated by an executable
# create by this package and we don't want this package to depend on itself.
pwd := $(shell pwd)
# Modify the GHC configure parameters to point to a local version of
DEB_SETUP_GHC_CONFIGURE_ARGS += --with-hscolour=$(pwd)/hscolour-wrapper
# Generate a fake version of the executable (a trivial shell script) which is
# available at configure time. This shell script will exec the real HsColour
# executable if it can be found. If it can't be found it will give a sensible
# result for a version request (which is enough to fool haddock) and exit with
# an error for anything else.
hscolour-wrapper : debian/hscolour-wrapper
cp $+ $@
chmod u+x $@
# Force generation of the wrapper script.
configure-ghc-stamp : hscolour-wrapper
# Ensure arch-all-only works
rm -f hscolour-wrapper
# Standard way of building Haskell binary.