emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109962: Improve robustness of 'make


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109962: Improve robustness of 'make bootstrap'.
Date: Sun, 09 Sep 2012 18:03:27 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109962
fixes bug: http://debbugs.gnu.org/12376
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sun 2012-09-09 18:03:27 -0700
message:
  Improve robustness of 'make bootstrap'.
  
  Run autogen.sh after bootstrap-clean, to avoid bzr pull issues.
  * INSTALL, README: Document autogen.sh.
  * Makefile.in (Makefile): Mark it as precious, since it's updated
  atomically.
  (MAKE_CONFIG_STATUS): New macro.
  (config.status, bootstrap): Use it.  This causes 'make bootstrap'
  to run config.status with the --recheck option, which is more
  appropriate for a bootstrap.
  (bootstrap): Run autogen.sh right after cleaning.  Don't worry
  about failures due to missing tools.
  * autogen.sh: Exit with status 101 when failing due to missing tools.
  * make-dist: Distribute autogen.sh.
modified:
  ChangeLog
  INSTALL
  Makefile.in
  README
  autogen.sh
  make-dist
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-09-09 16:06:33 +0000
+++ b/ChangeLog 2012-09-10 01:03:27 +0000
@@ -1,3 +1,19 @@
+2012-09-10  Paul Eggert  <address@hidden>
+
+       Improve robustness of 'make bootstrap' (Bug#12376).
+       Run autogen.sh after bootstrap-clean, to avoid bzr pull issues.
+       * INSTALL, README: Document autogen.sh.
+       * Makefile.in (Makefile): Mark it as precious, since it's updated
+       atomically.
+       (MAKE_CONFIG_STATUS): New macro.
+       (config.status, bootstrap): Use it.  This causes 'make bootstrap'
+       to run config.status with the --recheck option, which is more
+       appropriate for a bootstrap.
+       (bootstrap): Run autogen.sh right after cleaning.  Don't worry
+       about failures due to missing tools.
+       * autogen.sh: Exit with status 101 when failing due to missing tools.
+       * make-dist: Distribute autogen.sh.
+
 2012-09-09  Paul Eggert  <address@hidden>
 
        Assume C89 or later for math functions (Bug#12381).

=== modified file 'INSTALL'
--- a/INSTALL   2012-08-08 16:17:15 +0000
+++ b/INSTALL   2012-09-10 01:03:27 +0000
@@ -695,9 +695,9 @@
 corresponding `Makefile.in' files.  This isn't so hard, just a matter
 of editing in appropriate substitutions for the @...@ constructs.
 
-The `configure' script is built from `configure.ac' by the `autoconf'
-program.  You need at least the version of autoconf specified in the
-AC_PREREQ(...) command to rebuild `configure' from `configure.ac'.
+The `configure' script is built from `configure.ac' by the
+`autogen.sh' script, which checks that `autoconf' and other build
+tools are sufficiently up to date and then runs the build tools.
 
 BUILDING GNU EMACS BY HAND
 

=== modified file 'Makefile.in'
--- a/Makefile.in       2012-08-22 06:55:44 +0000
+++ b/Makefile.in       2012-09-10 01:03:27 +0000
@@ -360,15 +360,17 @@
           $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN)
        ./config.status
 
-# Don't erase config.status if make is interrupted while refreshing it.
-.PRECIOUS: config.status
+# Don't erase these files if make is interrupted while refreshing them.
+.PRECIOUS: Makefile config.status
 
-config.status: ${srcdir}/configure ${srcdir}/lisp/version.el
+MAKE_CONFIG_STATUS = \
        if [ -x ./config.status ]; then \
            ./config.status --recheck;  \
        else                            \
            ./configure $(CONFIGURE_FLAGS); \
        fi
+config.status: ${srcdir}/configure ${srcdir}/lisp/version.el
+       $(MAKE_CONFIG_STATUS)
 
 AUTOCONF_INPUTS = $(srcdir)/configure.ac $(srcdir)/aclocal.m4
 
@@ -383,6 +385,10 @@
   $(srcdir)/lib/gnulib.mk
 $(srcdir)/lib/Makefile.in: $(AUTOMAKE_INPUTS)
        cd $(srcdir) && automake --gnu -a -c lib/Makefile
+
+# Regenerate files that this makefile would have made, if this makefile
+# had been built by Automake.  The name 'am--refresh' is for
+# compatibility with subsidiary Automake-generated makefiles.
 am--refresh: $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/src/config.in
 .PHONY: am--refresh
 
@@ -776,8 +782,6 @@
        (cd lisp;     $(MAKE) $(MFLAGS) bootstrap-clean)
        [ ! -f config.log ] || mv -f config.log config.log~
        ${top_bootclean}
-## configure; make bootstrap replaces the real config.log from configure
-## with the truncated one from config.status.  The former is more useful.
 
 ### `maintainer-clean'
 ###      Delete everything from the current directory that can be
@@ -883,14 +887,14 @@
 
 .PHONY: bootstrap
 
-## configure; make bootstrap replaces the real config.log from configure
-## with the truncated one from config.status.  The former is more useful.
+# 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).
+#  * Build Makefile, to build the build procedure itself.
+#  * Do the actual build.
 bootstrap: bootstrap-clean FRC
-       if [ -x ./config.status ]; then           \
-           ./config.status;                      \
-       else                                      \
-           ./configure $(CONFIGURE_FLAGS);       \
-       fi
+       cd $(srcdir) && { ./autogen.sh || test $$? -eq 101; }
+       $(MAKE_CONFIG_STATUS)
        $(MAKE) $(MFLAGS) info all
 
 .PHONY: check-declare

=== modified file 'README'
--- a/README    2012-08-28 16:01:59 +0000
+++ b/README    2012-09-10 01:03:27 +0000
@@ -41,9 +41,14 @@
 construct the `configure' script.  Since Emacs has some configuration
 requirements that autoconf can't meet directly, and for historical
 reasons, `configure.ac' uses an unholy marriage of custom-baked
-configuration code and autoconf macros.  If you want to rebuild
-`configure' from `configure.ac', you will need to install a recent
-version of autoconf and GNU m4.
+configuration code and autoconf macros.
+
+The shell script `autogen.sh' generates 'configure' and other files by
+running the GNU build tools autoconf and automake, which in turn use
+GNU m4 and Perl.  If you want to use it, you will need to install
+recent versions of these build tools.  This should be needed only if
+you edit files like `configure.ac' that specify Emacs's autobuild
+procedure.
 
 The file `Makefile.in' is a template used by `configure' to create
 `Makefile'.

=== modified file 'autogen.sh'
--- a/autogen.sh        2012-08-07 01:03:44 +0000
+++ b/autogen.sh        2012-09-10 01:03:27 +0000
@@ -201,7 +201,7 @@
 Please report any problems with this script to address@hidden .
 EOF
 
-    exit 1
+    exit 101 # Exit status 101 means tools were missing.
 fi
 
 echo "Your system has the required tools, running autoreconf..."

=== modified file 'make-dist'
--- a/make-dist 2012-08-02 06:21:48 +0000
+++ b/make-dist 2012-09-10 01:03:27 +0000
@@ -273,7 +273,7 @@
 ### README while the rest of the tar file is still unpacking.  Whoopee.
 echo "Making links to top-level files"
 ln INSTALL README BUGS ${tempdir}
-ln ChangeLog Makefile.in configure configure.ac ${tempdir}
+ln ChangeLog Makefile.in autogen.sh configure configure.ac ${tempdir}
 ln config.bat make-dist .dir-locals.el ${tempdir}
 ln aclocal.m4 ${tempdir}
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]