diff --git a/man/build-html b/man/build-html
index 2a2e332cd44a9b7e8668c7a3afe5f1ca47d87028..b705077ce6f32bcbcc08daf2fbb6d2875ec1ebc3 100755
--- a/man/build-html
+++ b/man/build-html
@@ -1,8 +1,36 @@
-#!/bin/sh
+#!/usr/bin/perl -w
 
-RMAN=../../rman-3.2/rman
+use strict;
 
-files='blkcalc blkcat disk_sreset disk_stat blkls blkstat ffind fls fsstat hfind icat ifind ils img_cat img_stat istat jcat jls mactime mmcat mmls mmstat sigfind sorter'
-for f in $files
-  do $RMAN -f html ${f}.1 > ../../www/man/${f}.html
-done
+my $BACK = "";
+my $RMAN = "/rman-3.2/rman";
+
+# rman and www are back different levels depending on 
+# which branch we are on.
+if (-d "../../../rman-3.2") {
+    $BACK = "../../../";
+} elsif (-d "../../../../rman-3.2") {
+    $BACK = "../../../../";
+} else {
+    die "Missing rman directory";
+}
+
+die "www not in same dir as rman" unless (-e "${BACK}/www");
+
+print "Cleaning up www directory\n";
+system ("rm ${BACK}/www/man/*.html");
+
+print "Building html files\n";
+opendir (DIR, ".") or die "Error opening current directory";
+while (1) {
+    my $f = readdir(DIR);
+    last unless defined ($f);
+    next if (($f eq ".") || ($f eq ".."));
+    if ($f =~ /^(.*?)\.1$/) {
+        $f = $1;
+    } else {
+        next;
+    }
+
+    system("${BACK}${RMAN} -f html ${f}.1 > ${BACK}/www/man/${f}.html");
+}
diff --git a/tsk3/docs/Doxyfile b/tsk3/docs/Doxyfile
index aabd91a0a0455e01fb4bef4003e92a8976ede472..40d60761e8485e14d278496dd77af450d59f3226 100644
--- a/tsk3/docs/Doxyfile
+++ b/tsk3/docs/Doxyfile
@@ -38,7 +38,7 @@ PROJECT_NUMBER         = 3.0
 # If a relative path is entered, it will be relative to the location 
 # where doxygen was started. If left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = ../www/docs
+OUTPUT_DIRECTORY       = ../../../www/docs
 
 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
 # 4096 sub-directories (in 2 levels) under the output directory of each output