]> gitweb.michael.orlitzky.com - spline3.git/blob - util/hscolour_srcs
d5c015cc6ec922e073552324a876ba5f434ce465
[spline3.git] / util / hscolour_srcs
1 #!/bin/bash
2 #
3 # hscolour_srcs
4 #
5 # Called from the makefile to generate colourised source HTML which is
6 # then used by Haddock.
7 #
8
9 # Find all source files. The way we do this is important, because of
10 # the dirname and basename invocations below. The paths here must
11 # coincide with the ones passed to 'haddock' in the makefile.
12 SRCS=`find ./src -iname '*.hs'`
13
14 # We have to create the output directories before we start.
15 mkdir -p doc/html/src/Tests
16
17 for file in $SRCS; do
18 DIRNAME=`dirname $file`
19 BASENAME=`basename $file .hs`
20 OUTFILE="doc/html/${DIRNAME}/${BASENAME}.html"
21 HsColour -html -anchor $file > $OUTFILE
22 done