+### Check for .el files that would overflow the 14-char limit if compiled.
+long=`find lisp -name '???????????*.el' -print`
+if [ "$long" != "" ]; then
+ echo "The following .el file names are too long:"
+ echo "$long"
+fi
+
+### Make sure configure is newer than configure.in.
+if [ "x`ls -t configure configure.in | head -1`" != "xconfigure" ]; then
+ echo "\`./configure.in' is newer than \`./configure'" >&2
+ echo "Running autoconf" >&2
+ autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; }
+fi
+
+### Update getdate.c.
+(cd lib-src; make -f Makefile getdate.c YACC="bison -y")
+
+echo "Updating Info files"
+
+(cd man; make info)
+
+echo "Updating finder-inf.el"
+
+(cd lisp; ../src/emacs -batch -l finder -f finder-compile-keywords-make-dist)
+
+echo "Recompiling Lisp files"
+
+src/emacs -batch -f batch-byte-recompile-directory lisp
+
+echo "Updating autoloads"
+
+src/emacs -batch -f batch-update-autoloads lisp
+
+echo "Making lisp/MANIFEST"
+
+(cd lisp; head -1 [!=]*.el | grep '^;' | sed -e 's/;;; //' > MANIFEST)
+