#!/bin/sh
#

usage="\
Usage: gtkdoc-mkhtml MODULE DRIVER_FILE"

if test "x$1" = "x--version"; then
      echo "0.6"
      exit 0
fi

if test $# -ne 2; then
      echo "${usage}" 1>&2
      exit 1
fi

module=$1

prefix=/usr
gtkdocdir=/usr/share/gtk-doc/

# Delete the old index.sgml file, if it exists.
if test -f index.sgml; then
      rm -f index.sgml
fi

jade -t sgml -w no-idref -d $gtkdocdir/gtk-doc.dsl $2
sed s%href=\"%href=\"$module/% < index.sgml > index.sgml.tmp && mv index.sgml.tmp index.sgml

echo "timestamp" > ../html.stamp
