--- /dev/null
+#!/bin/bash
+
+set -e # abort on error
+
+# Make documentation to put in debian package
+# This must match prebuilt upstream documentation
+
+if [ -f make-doc.sh ]; then
+ echo "Making upstream documentation for CVS checked-out package"
+ ./make-doc.sh
+else
+ echo "Unable to build documentation for CVS checked out package"
+ exit 1
+fi
+
+# Clean checked out CVS directory
+rm -f debian/upload.sh debian/make-upstream.sh debian/make-debian.sh debian/cvsbp-prepare.sh
+rm -f make-doc.sh do-autoconf
+rm -f `find . -type f -name .cvsignore`
+rm -rf images doc stamp-h.in build-stamp configure-stamp
+rm -f cvsbp-prepare.sh
+