#!/bin/bash # # hscolour_srcs # # Called from the makefile to generate colourised source HTML which is # then used by Haddock. # # Find all source files. The way we do this is important, because of # the dirname and basename invocations below. The paths here must # coincide with the ones passed to 'haddock' in the makefile. SRCS=`find ./src -iname '*.hs'` for file in $SRCS; do DIRNAME=`dirname $file` BASENAME=`basename $file .hs` OUTDIR="dist/doc/html/spline3/spline3/${DIRNAME}/" mkdir -p "${OUTDIR}" OUTFILE="${OUTDIR}/${BASENAME}.html" HsColour -html -anchor $file > $OUTFILE done