+if [ "$1" = "-update" -o "$2" = "-update" ] ; then
+ # They wanna update their Makefile.. good for 'em
+ # Make sure .config.cache exists
+ if [ ! -e ".config.cache" ] ; then
+ echo "You have not run ./configure before. Please do this before trying to run the update script."
+ exit 0
+ fi
+ # Right, load the cache values
+ . .config.cache
+ # Check for modules
+
+ case "$OSNAME" in
+ (FreeBSD)
+ LDLIBS="-Ldl"
+ FLAGS="-fPIC -frtti $OPTIMISATI"
+ MAKEPROG="gmake"
+ ;;
+ (*)
+ LDLIBS="-ldl"
+ FLAGS="-fPIC -frtti $OPTIMISATI"
+ MAKEPROG="make"
+ ;;
+ esac
+
+ MODULES=""
+ for module in src/modules/*.cpp ; do
+ mod=`echo $module | sed 's/.cpp/.so/' | sed 's/src\/modules\///'`
+ MODULES="$MODULES $mod"
+ done
+
+ # Write the new makefile.
+ . .Makefile.inc
+ echo "Complete."
+ exit 1;
+fi
+
+