#!/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'` # We have to create the output directories before we start. mkdir -p doc/html/src/Tests for file in $SRCS; do DIRNAME=`dirname $file` BASENAME=`basename $file .hs` OUTFILE="doc/html/${DIRNAME}/${BASENAME}.html" HsColour -html -anchor $file > $OUTFILE done