+export CITADEL_BUILD_DIR=/tmp/citadel-build-$$
+export WEBCIT_BUILD_DIR=/tmp/webcit-build-$$
+rm -fr $CITADEL_BUILD_DIR $WEBCIT_BUILD_DIR
+
+# libcitadel has to be built in a "real" library directory
+pushd ../libcitadel || exit 1
+make distclean 2>/dev/null
+./bootstrap || exit 2
+./configure || exit 3
+make || exit 4
+make install || exit 5
+popd
+
+# Build the Citadel server
+pushd ../citadel || exit 6
+make distclean 2>/dev/null
+./bootstrap || exit 7
+./configure --prefix=$CITADEL_BUILD_DIR || exit 8
+make || exit 9
+make install || exit 10
+popd
+
+# Build WebCit
+pushd ../webcit || exit 11
+make distclean 2>/dev/null
+./bootstrap || exit 12
+./configure --prefix=$WEBCIT_BUILD_DIR || exit 13
+make || exit 14
+make install || exit 15
+popd
+
+# Clear out any old versions in the AppDir