automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.1-98


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.1-98-g7c6310c
Date: Wed, 20 Jun 2012 16:41:06 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=7c6310c3a069ad18b3be277be606c7109f8e9a82

The branch, master has been updated
       via  7c6310c3a069ad18b3be277be606c7109f8e9a82 (commit)
       via  fe4d80cd4069709f2b0ff54f6fc0514c740cdf87 (commit)
       via  8d864157b3f636d6aa29e887392a677b3990d257 (commit)
      from  5741ca220ca4ac908abdf78cc475e1e590b00a23 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7c6310c3a069ad18b3be277be606c7109f8e9a82
Merge: 5741ca2 fe4d80c
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jun 20 18:35:57 2012 +0200

    Merge branch 'maint'
    
    * maint:
      bootstrap: overhaul and improve
      docs: quote 'like this', not `like this'

-----------------------------------------------------------------------

Summary of changes:
 GNUmakefile       |  105 +++++++++++++++++++++++++++++++----------------------
 doc/automake.texi |   18 +++++-----
 2 files changed, 71 insertions(+), 52 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index 0676618..20af004 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -15,54 +15,73 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+ifeq ($(filter bootstrap,$(MAKECMDGOALS)),)
+
 ifeq ($(wildcard Makefile),)
-  ifeq ($(filter bootstrap,$(MAKECMDGOALS)),bootstrap)
-    # Allow the user (or more likely the developer) to ask for a bootstrap
-    # of the package; of course, this can happen before configure is run,
-    # and in fact even before it is created.
-  else
-    # Else, If the user runs GNU make but has not yet run ./configure,
-    # give them an helpful diagnostic instead of a cryptic error.
-    $(warning There seems to be no Makefile in this directory.)
-    $(warning You must run ./configure before running 'make'.)
-    $(error Fatal Error)
-  endif
-else
-  include ./Makefile
-  include $(srcdir)/syntax-checks.mk
+  # Any target but 'bootstrap' specified in an unconfigured tree
+  # is an error, env when the user is running GNU make.
+  $(warning There seems to be no Makefile in this directory.)
+  $(warning You must run ./configure before running 'make'.)
+  $(error Fatal Error)
 endif
+include ./Makefile
+include $(srcdir)/syntax-checks.mk
+
+else # ! bootstrap in $(MAKECMDGOALS)
+
+other-targets := $(filter-out bootstrap,$(MAKECMDGOALS))
+config-status := $(wildcard ./config.status)
 
-# To allow bootstrapping also in an unconfigured tree.
-srcdir ?= .
-am__cd ?= CDPATH=. && unset CDPATH && cd
-AM_DEFAULT_VERBOSITY ?= 0
-V ?= $(AM_DEFAULT_VERBOSITY)
+BOOTSTRAP_SHELL ?= /bin/sh
+export BOOTSTRAP_SHELL
 
-ifeq ($(V),0)
-  AM_V_BOOTSTRAP = @echo "  BOOTSTRAP";
-  AM_V_CONFIGURE = @echo "  CONFIGURE";
-  AM_V_REMAKE    = @echo "  REMAKE";
-else
-  AM_V_BOOTSTRAP =
-  AM_V_CONFIGURE =
-  AM_V_REMAKE    =
+# Allow the user (or more likely the developer) to ask for a bootstrap
+# of the package.
+#
+# Two issues that must be kept in mind in the implementation below:
+#
+#  [1] "make bootstrap" can be invoked before 'configure' is run (and in
+#      fact, even before it is created, if we are bootstrapping from a
+#      freshly-cloned checkout).
+#
+#  [2] When re-bootstrapping an already configured tree, we must ensure
+#      that the automatic remake rules for Makefile and company do not
+#      kick in, because the tree might be in an inconsistent state (e.g.,
+#      we have just switched from 'maint' to 'master', and have the built
+#      'automake' script left from 'maint', but the files 'lib/am/*.am'
+#      are from 'master': if 'automake' gets run and used those files --
+#      boom!).
+
+ifdef config-status # Bootstrap from an already-configured tree.
+  # We need the definition of $(srcdir) in the 'bootstrap' rule
+  # below.
+  srcdir := $(shell echo @srcdir@ | $(config-status) --file=-)
+  ifndef srcdir
+    $(error Could not obtain $$(srcdir) from $(config-status))
+  endif
+  # Also, if we are re-bootstrapping an already-configured tree, we
+  # want to re-configure it with the same pre-existing configuration.
+  old-configure-flags := $(shell $(config-status) --config)
+else # Assume we are bootstrapping from an unconfigured srcdir.
+  srcdir := .
+  old-configure-flags :=
 endif
 
-# Must be phony, not to be confused with the 'bootstrap' script.
+configure-flags := $(old-configure-flags) $(BOOTSTRAP_CONFIGURE_FLAGS)
+
 .PHONY: bootstrap
 bootstrap:
-       $(AM_V_BOOTSTRAP)$(am__cd) $(srcdir) && ./bootstrap.sh
-       $(AM_V_CONFIGURE)set -e; \
-       am__bootstrap_configure () { \
-         $(srcdir)/configure $${1+"$$@"} $(BOOTSTRAP_CONFIGURE_FLAGS); \
-       }; \
-       if test -f $(srcdir)/config.status; then \
-         : config.status should return a string properly quoted for eval; \
-         old_configure_flags=`$(srcdir)/config.status --config`; \
-       else \
-         old_configure_flags=""; \
-       fi; \
-       eval am__bootstrap_configure "$$old_configure_flags"
-       # The "make check" below is to ensure all the testsuite-required
-       # files are rebuilt.
-       $(AM_V_REMAKE)$(MAKE) clean && $(MAKE) check TESTS=t/get-sysconf
+       cd $(srcdir) && $(SHELL) ./bootstrap.sh
+       $(srcdir)/configure $(configure-flags)
+       $(MAKE) clean
+       $(MAKE) check TESTS=t/get-sysconf
+
+# Ensure that all the specified targets but 'bootstrap' (if any) are
+# run with a properly re-bootstrapped tree.
+ifdef other-targets
+$(other-targets): restart
+.PHONY: $(other-targets) restart
+restart: bootstrap; $(MAKE) $(AM_MAKEFLAGS) $(other-targets)
+endif
+
+endif # ! bootstrap in $(MAKECMDGOALS)
diff --git a/doc/automake.texi b/doc/automake.texi
index 94743ae..12c4c05 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -1453,7 +1453,7 @@ package.
 @example
 ~/amhello % @kbd{cat README}
 This is a demonstration package for GNU Automake.
-Type `info Automake' to read the Automake manual.
+Type 'info Automake' to read the Automake manual.
 @end example
 
 @item
@@ -1495,9 +1495,9 @@ command as follows:
 
 @example
 ~/amhello % @kbd{autoreconf --install}
-configure.ac: installing `./install-sh'
-configure.ac: installing `./missing'
-src/Makefile.am: installing `./depcomp'
+configure.ac: installing './install-sh'
+configure.ac: installing './missing'
+src/Makefile.am: installing './depcomp'
 @end example
 
 At this point the build system is complete.
@@ -1838,8 +1838,8 @@ Also, using more complex macro in target names can cause 
trouble:
 % @kbd{cat Makefile.am}
 $(FOO:=x): bar
 % @kbd{automake}
-Makefile.am:1: bad characters in variable name `$(FOO'
-Makefile.am:1: `:='-style assignments are not portable
+Makefile.am:1: bad characters in variable name '$(FOO'
+Makefile.am:1: ':='-style assignments are not portable
 @end example
 
 @cindex Make targets, overriding
@@ -5510,7 +5510,7 @@ replace) @file{foo.$(OBJEXT)}, and this cannot be avoided.
 Therefore, when Automake detects this situation it will complain
 with a message such as
 @example
-object `foo.$(OBJEXT)' created both with libtool and without
+object 'foo.$(OBJEXT)' created both with libtool and without
 @end example
 
 A workaround for this issue is to ensure that these two objects get
@@ -8874,7 +8874,7 @@ HP-UX's @command{/bin/sh},
 @example
 AM_TESTS_ENVIRONMENT = \
 ## Some environment initializations are kept in a separate shell
-## file `tests-env.sh', which can make it easier to also run tests
+## file 'tests-env.sh', which can make it easier to also run tests
 ## from the command line.
   . $(srcdir)/tests-env.sh; \
 ## On Solaris, prefer more POSIX-compliant versions of the standard
@@ -8974,7 +8974,7 @@ rules that run the test scripts listed in @code{TESTS}, 
and, for each
 such script, save its output in a corresponding @file{.log} file and
 its results (and other ``metadata'', @pxref{API for Custom Test Drivers})
 in a corresponding @file{.trs} (as in @b{T}est @address@hidden) file.
address@hidden We choose the `.trs' extension also because, at the time of 
writing,
address@hidden We choose the '.trs' extension also because, at the time of 
writing,
 @c it isn't already used for other significant purposes; see e.g.:
 @c   - http://filext.com/file-extension/trs
 @c   - http://www.file-extensions.org/search/?searchstring=trs


hooks/post-receive
-- 
GNU Automake



reply via email to

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