This undoes part of the 2012-09-10 patch.
(bootstrap): Run ./configure, rather than trying to run config.status
if it exists. That builds src/epaths.h more reliably.
+ Run autogen/copy_autogen if autogen.sh fails,
+ to create 'configure'; problem reported by Andreas Schwab in
+ <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00438.html>.
+ * autogen.sh: Exit with status 1 when failing due to missing tools,
+ reverting the 2012-09-10 change to this file.
+ * autogen/copy_autogen: Fail if one of the subsidiary actions fail.
+ Use 'cp -f' for the build-aux files, since the destinations are
+ typically read-only.
Remove no-longer-needed Solaris 2.4 vfork bug workaround.
* configure.ac (ac_cv_func_vfork_works): Default to 'no' on
# Bootstrapping does the following:
# * Remove files to start from a clean slate.
-# * Run autogen.sh, but don't worry about exit status 101 (missing tools).
+# * Run autogen.sh, falling back on copy_autogen if autogen.sh fails.
# * Build Makefile, to build the build procedure itself.
# * Do the actual build.
bootstrap: bootstrap-clean FRC
- cd $(srcdir) && { ./autogen.sh || test $$? -eq 101; }
+ cd $(srcdir) && { ./autogen.sh || autogen/copy_autogen; }
./configure $(CONFIGURE_FLAGS)
$(MAKE) $(MFLAGS) info all
Please report any problems with this script to bug-gnu-emacs@gnu.org .
EOF
- exit 101 # Exit status 101 means tools were missing.
+ exit 1
fi
echo "Your system has the required tools, running autoreconf..."
## regenerate configure and will fail if you do not have the required
## tools. You will have to run this script again.
-test -d autogen && cd autogen
+test ! -d autogen || cd autogen || exit
if test ! -e config.in; then
echo "Cannot find autogen/ directory."
fi
## Order implied by top-level Makefile's rules, for time-stamps.
-cp compile config.guess config.sub depcomp install-sh missing ../build-aux
-cp aclocal.m4 ../
-cp configure ../
-touch ../src/stamp-h.in
-cp config.in ../src/
-cp Makefile.in ../lib/
+cp -f compile config.guess config.sub depcomp install-sh missing \
+ ../build-aux &&
+cp aclocal.m4 ../ &&
+cp configure ../ &&
+touch ../src/stamp-h.in &&
+cp config.in ../src/ &&
+cp Makefile.in ../lib/ &&
echo "You can now run configure"