+sub build_html_documentation {
+ my $context = shift;
+
+ my $genpath = $context->{webgen_base} . '/script/gen.pl';
+ my $templates = $context->{webgen_base} . '/templates';
+ my $dir = 'html';
+ mkdir($dir);
+
+ my @cmd = (
+ $genpath, '--spec', 'doc/doc-docbook/spec.xml', '--filter',
+ 'doc/doc-docbook/filter.xml', '--latest', $context->{trelease}, '--tmpl',
+ $templates, '--docroot', $dir
+ );
+
+ print "Executing ", join( ' ', @cmd ), "\n";
+ system(@cmd);
+
+ # move directory into right place
+ rename( sprintf( 'html/exim-html-%s', $context->{trelease} ), sprintf( 'exim-html-%s', $context->{release} ) );
+}
+
+# ------------------------------------------------------------------
+