From dee26dfa11ac3936c84f42b83a0e1ec7ae2b15f9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 17 Sep 2012 15:35:28 -0700 Subject: [PATCH] * Makefile.in: Run autogen/copy_autogen if autogen.sh fails, to create 'configure'; problem reported by Andreas Schwab in . * 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. --- ChangeLog | 8 ++++++++ Makefile.in | 4 ++-- autogen.sh | 2 +- autogen/copy_autogen | 15 ++++++++------- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48d1e52e2cd..3b5b6862a15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,14 @@ 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 + . + * 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 diff --git a/Makefile.in b/Makefile.in index 386c4c135be..56a54403ef3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -890,11 +890,11 @@ dvi: # 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 diff --git a/autogen.sh b/autogen.sh index dc8d53eec97..9cfaa40eee5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -201,7 +201,7 @@ This is not recommended - see the comments in \`copy_autogen'. 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..." diff --git a/autogen/copy_autogen b/autogen/copy_autogen index b6af9b6eb35..8aacd4d399a 100755 --- a/autogen/copy_autogen +++ b/autogen/copy_autogen @@ -8,7 +8,7 @@ ## 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." @@ -16,11 +16,12 @@ if test ! -e config.in; then 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" -- 2.39.2